unit PXL.Windows.D3D11;
(*
 * This file is part of Asphyre Framework, also known as Platform eXtended Library (PXL).
 * Copyright (c) 2015 - 2017 Yuriy Kotsarenko. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 *)
{
  DirectX Headers translation by Yuriy Kotsarenko, August 2015. Revision 1.0.

  Translated DirectX C/C++ files:
    d3d11.h
    d3d11_1.h
    d3d11_2.h

  Original source code was taken from:
    %WINDOWS_KITS%\8.1\Include\um\
    %WINDOWS_KITS%\8.1\Include\shared\

  Note: portions of this file were translated using automated tool.
}
interface

{$IFDEF FPC}
  {$PACKRECORDS C}
  {$MODE DELPHI}
{$ELSE}
  {$ALIGN ON}
{$ENDIF}

uses
  Windows, PXL.Windows.D3DCommon, PXL.Windows.DXGI;

const
  D3D11_16BIT_INDEX_STRIP_CUT_VALUE = $FFFF;
  D3D11_32BIT_INDEX_STRIP_CUT_VALUE = $FFFFFFFF;
  D3D11_8BIT_INDEX_STRIP_CUT_VALUE = $FF;
  D3D11_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9;
  D3D11_CLIP_OR_CULL_DISTANCE_COUNT = 8;
  D3D11_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT = 16;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
  D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
  D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64;
  D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
  D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1;
  D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
  D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
  D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32;
  D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1;
  D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128;
  D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1;
  D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1;
  D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128;
  D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1;
  D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16;
  D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1;
  D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1;
  D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT = 16;
  D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32;
  D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4;
  D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_COMMONSHADER_TEMP_REGISTER_COUNT = 4096;
  D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3;
  D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3;
  D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10;
  D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10;
  D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8;
  D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7;
  D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 256;
  D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = 64;
  D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 240;
  D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = 68;
  D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 224;
  D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = 72;
  D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 208;
  D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = 76;
  D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 192;
  D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = 84;
  D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 176;
  D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = 92;
  D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 160;
  D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = 100;
  D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 144;
  D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = 112;
  D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 128;
  D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = 128;
  D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 112;
  D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = 144;
  D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 96;
  D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = 168;
  D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 80;
  D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = 204;
  D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 64;
  D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = 256;
  D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 48;
  D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = 340;
  D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 32;
  D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = 512;
  D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 16;
  D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = 768;
  D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = 1;
  D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = 256;
  D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = 768;
  D3D11_CS_4_X_THREAD_GROUP_MAX_X = 768;
  D3D11_CS_4_X_THREAD_GROUP_MAX_Y = 768;
  D3D11_CS_4_X_UAV_REGISTER_COUNT = 1;
  D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = 65535;
  D3D11_CS_TGSM_REGISTER_COUNT = 8192;
  D3D11_CS_TGSM_REGISTER_READS_PER_INST = 1;
  D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = 1;
  D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = 1;
  D3D11_CS_THREADGROUPID_REGISTER_COMPONENTS = 3;
  D3D11_CS_THREADGROUPID_REGISTER_COUNT = 1;
  D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS = 1;
  D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT = 1;
  D3D11_CS_THREADIDINGROUP_REGISTER_COMPONENTS = 3;
  D3D11_CS_THREADIDINGROUP_REGISTER_COUNT = 1;
  D3D11_CS_THREADID_REGISTER_COMPONENTS = 3;
  D3D11_CS_THREADID_REGISTER_COUNT = 1;
  D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = 1024;
  D3D11_CS_THREAD_GROUP_MAX_X = 1024;
  D3D11_CS_THREAD_GROUP_MAX_Y = 1024;
  D3D11_CS_THREAD_GROUP_MAX_Z = 64;
  D3D11_CS_THREAD_GROUP_MIN_X = 1;
  D3D11_CS_THREAD_GROUP_MIN_Y = 1;
  D3D11_CS_THREAD_GROUP_MIN_Z = 1;
  D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = 16384;
  D3D11_DEFAULT_BLEND_FACTOR_ALPHA = 1.0;
  D3D11_DEFAULT_BLEND_FACTOR_BLUE = 1.0;
  D3D11_DEFAULT_BLEND_FACTOR_GREEN = 1.0;
  D3D11_DEFAULT_BLEND_FACTOR_RED = 1.0;
  D3D11_DEFAULT_BORDER_COLOR_COMPONENT = 0.0;
  D3D11_DEFAULT_DEPTH_BIAS = 0;
  D3D11_DEFAULT_DEPTH_BIAS_CLAMP = 0.0;
  D3D11_DEFAULT_MAX_ANISOTROPY = 16;
  D3D11_DEFAULT_MIP_LOD_BIAS = 0.0;
  D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0;
  D3D11_DEFAULT_SAMPLE_MASK = $FFFFFFFF;
  D3D11_DEFAULT_SCISSOR_ENDX = 0;
  D3D11_DEFAULT_SCISSOR_ENDY = 0;
  D3D11_DEFAULT_SCISSOR_STARTX = 0;
  D3D11_DEFAULT_SCISSOR_STARTY = 0;
  D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0;
  D3D11_DEFAULT_STENCIL_READ_MASK = $FF;
  D3D11_DEFAULT_STENCIL_REFERENCE = 0;
  D3D11_DEFAULT_STENCIL_WRITE_MASK = $FF;
  D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0;
  D3D11_DEFAULT_VIEWPORT_HEIGHT = 0;
  D3D11_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0;
  D3D11_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0;
  D3D11_DEFAULT_VIEWPORT_TOPLEFTX = 0;
  D3D11_DEFAULT_VIEWPORT_TOPLEFTY = 0;
  D3D11_DEFAULT_VIEWPORT_WIDTH = 0;
  D3D11_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
  D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = 4;
  D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = 32;
  D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
  D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = 1;
  D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = 3;
  D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = 1;
  D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = 2;
  D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = 1;
  D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
  D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
  D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
  D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
  D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
  D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
  D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
  D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
  D3D11_DS_OUTPUT_REGISTER_COMPONENTS = 4;
  D3D11_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_DS_OUTPUT_REGISTER_COUNT = 32;
  D3D11_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6;
  D3D11_FLOAT32_MAX = 3.402823466E+38;
  D3D11_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6;
  D3D11_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 2.4;
  D3D11_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 1.0;
  D3D11_FLOAT_TO_SRGB_OFFSET = 0.055;
  D3D11_FLOAT_TO_SRGB_SCALE_1 = 12.92;
  D3D11_FLOAT_TO_SRGB_SCALE_2 = 1.055;
  D3D11_FLOAT_TO_SRGB_THRESHOLD = 0.0031308;
  D3D11_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999;
  D3D11_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999;
  D3D11_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999;
  D3D11_FTOU_INSTRUCTION_MIN_INPUT = 0.0;
  D3D11_GS_INPUT_INSTANCE_ID_READS_PER_INST = 2;
  D3D11_GS_INPUT_INSTANCE_ID_READ_PORTS = 1;
  D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = 1;
  D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = 1;
  D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1;
  D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1;
  D3D11_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2;
  D3D11_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1;
  D3D11_GS_INPUT_REGISTER_COMPONENTS = 4;
  D3D11_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_GS_INPUT_REGISTER_COUNT = 32;
  D3D11_GS_INPUT_REGISTER_READS_PER_INST = 2;
  D3D11_GS_INPUT_REGISTER_READ_PORTS = 1;
  D3D11_GS_INPUT_REGISTER_VERTICES = 32;
  D3D11_GS_MAX_INSTANCE_COUNT = 32;
  D3D11_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = 1024;
  D3D11_GS_OUTPUT_ELEMENTS = 32;
  D3D11_GS_OUTPUT_REGISTER_COMPONENTS = 4;
  D3D11_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_GS_OUTPUT_REGISTER_COUNT = 32;
  D3D11_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = 32;
  D3D11_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = 32;
  D3D11_HS_CONTROL_POINT_REGISTER_COMPONENTS = 4;
  D3D11_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_HS_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
  D3D11_HS_CONTROL_POINT_REGISTER_READ_PORTS = 1;
  D3D11_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = $FFFFFFFF;
  D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = 1;
  D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = 1;
  D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
  D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = 1;
  D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = 1;
  D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = 1;
  D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
  D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = 1;
  D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
  D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
  D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
  D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
  D3D11_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = $FFFFFFFF;
  D3D11_HS_MAXTESSFACTOR_LOWER_BOUND = 1.0;
  D3D11_HS_MAXTESSFACTOR_UPPER_BOUND = 64.0;
  D3D11_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
  D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = 1;
  D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = 1;
  D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = 2;
  D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = 1;
  D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
  D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
  D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
  D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
  D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS = 128;
  D3D11_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0;
  D3D11_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0;
  D3D11_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0;
  D3D11_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1;
  D3D11_IA_INSTANCE_ID_BIT_COUNT = 32;
  D3D11_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32;
  D3D11_IA_PATCH_MAX_CONTROL_POINT_COUNT = 32;
  D3D11_IA_PRIMITIVE_ID_BIT_COUNT = 32;
  D3D11_IA_VERTEX_ID_BIT_COUNT = 32;
  D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
  D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
  D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
  D3D11_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = $FFFFFFFF;
  D3D11_INTEGER_DIVIDE_BY_ZERO_REMAINDER = $FFFFFFFF;
  D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = $FFFFFFFF;
  D3D11_KEEP_UNORDERED_ACCESS_VIEWS = $FFFFFFFF;
  D3D11_LINEAR_GAMMA = 1.0;
  D3D11_MAJOR_VERSION = 11;
  D3D11_MAX_BORDER_COLOR_COMPONENT = 1.0;
  D3D11_MAX_DEPTH = 1.0;
  D3D11_MAX_MAXANISOTROPY = 16;
  D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT = 32;
  D3D11_MAX_POSITION_VALUE = 3.402823466E+34;
  D3D11_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17;
  D3D11_MINOR_VERSION = 0;
  D3D11_MIN_BORDER_COLOR_COMPONENT = 0.0;
  D3D11_MIN_DEPTH = 0.0;
  D3D11_MIN_MAXANISOTROPY = 0;
  D3D11_MIP_LOD_BIAS_MAX = 15.99;
  D3D11_MIP_LOD_BIAS_MIN = -16.0;
  D3D11_MIP_LOD_FRACTIONAL_BIT_COUNT = 8;
  D3D11_MIP_LOD_RANGE_BIT_COUNT = 8;
  D3D11_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4;
  D3D11_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0;
  D3D11_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15;
  D3D11_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16;
  D3D11_PS_CS_UAV_REGISTER_COMPONENTS = 1;
  D3D11_PS_CS_UAV_REGISTER_COUNT = 8;
  D3D11_PS_CS_UAV_REGISTER_READS_PER_INST = 1;
  D3D11_PS_CS_UAV_REGISTER_READ_PORTS = 1;
  D3D11_PS_FRONTFACING_DEFAULT_VALUE = $FFFFFFFF;
  D3D11_PS_FRONTFACING_FALSE_VALUE = 0;
  D3D11_PS_FRONTFACING_TRUE_VALUE = $FFFFFFFF;
  D3D11_PS_INPUT_REGISTER_COMPONENTS = 4;
  D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_PS_INPUT_REGISTER_COUNT = 32;
  D3D11_PS_INPUT_REGISTER_READS_PER_INST = 2;
  D3D11_PS_INPUT_REGISTER_READ_PORTS = 1;
  D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0;
  D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1;
  D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1;
  D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
  D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
  D3D11_PS_OUTPUT_REGISTER_COMPONENTS = 4;
  D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_PS_OUTPUT_REGISTER_COUNT = 8;
  D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5;
  D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT = 16;
  D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = 4096;
  D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27;
  D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
  D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = 4096;
  D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32;
  D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32;
  D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 16384;
  D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024;
  D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
  D3D11_REQ_MAXANISOTROPY = 16;
  D3D11_REQ_MIP_LEVELS = 15;
  D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048;
  D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = 4096;
  D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 16384;
  D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = 128;
  D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = 0.25;
  D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM = 2048;
  D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = 20;
  D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = 4096;
  D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048;
  D3D11_REQ_TEXTURE1D_U_DIMENSION = 16384;
  D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048;
  D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384;
  D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048;
  D3D11_REQ_TEXTURECUBE_DIMENSION = 16384;
  D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0;
  D3D11_SHADER_MAJOR_VERSION = 5;
  D3D11_SHADER_MAX_INSTANCES = 65535;
  D3D11_SHADER_MAX_INTERFACES = 253;
  D3D11_SHADER_MAX_INTERFACE_CALL_SITES = 4096;
  D3D11_SHADER_MAX_TYPES = 65535;
  D3D11_SHADER_MINOR_VERSION = 0;
  D3D11_SHIFT_INSTRUCTION_PAD_VALUE = 0;
  D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5;
  D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
  D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
  D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 512;
  D3D11_SO_BUFFER_SLOT_COUNT = 4;
  D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP = $FFFFFFFF;
  D3D11_SO_NO_RASTERIZED_STREAM = $FFFFFFFF;
  D3D11_SO_OUTPUT_COMPONENT_COUNT = 128;
  D3D11_SO_STREAM_COUNT = 4;
  D3D11_SPEC_DATE_DAY = 16;
  D3D11_SPEC_DATE_YEAR = 2011;
  D3D11_SPEC_VERSION = 1.07;
  D3D11_SRGB_GAMMA = 2.2;
  D3D11_SRGB_TO_FLOAT_DENOMINATOR_1 = 12.92;
  D3D11_SRGB_TO_FLOAT_DENOMINATOR_2 = 1.055;
  D3D11_SRGB_TO_FLOAT_EXPONENT = 2.4;
  D3D11_SRGB_TO_FLOAT_OFFSET = 0.055;
  D3D11_SRGB_TO_FLOAT_THRESHOLD = 0.04045;
  D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 0.5;
  D3D11_STANDARD_COMPONENT_BIT_COUNT = 32;
  D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64;
  D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4;
  D3D11_STANDARD_PIXEL_COMPONENT_COUNT = 128;
  D3D11_STANDARD_PIXEL_ELEMENT_COUNT = 32;
  D3D11_STANDARD_VECTOR_SIZE = 4;
  D3D11_STANDARD_VERTEX_ELEMENT_COUNT = 32;
  D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64;
  D3D11_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
  D3D11_SUBTEXEL_FRACTIONAL_BIT_COUNT = 8;
  D3D11_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = 64;
  D3D11_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = 64;
  D3D11_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = 63;
  D3D11_TESSELLATOR_MAX_TESSELLATION_FACTOR = 64;
  D3D11_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = 2;
  D3D11_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = 1;
  D3D11_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = 1;
  D3D11_TEXEL_ADDRESS_RANGE_BIT_COUNT = 16;
  D3D11_UNBOUND_MEMORY_ACCESS_RESULT = 0;
  D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15;
  D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16;
  D3D11_VIEWPORT_BOUNDS_MAX = 32767;
  D3D11_VIEWPORT_BOUNDS_MIN = -32768;
  D3D11_VS_INPUT_REGISTER_COMPONENTS = 4;
  D3D11_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_VS_INPUT_REGISTER_COUNT = 32;
  D3D11_VS_INPUT_REGISTER_READS_PER_INST = 2;
  D3D11_VS_INPUT_REGISTER_READ_PORTS = 1;
  D3D11_VS_OUTPUT_REGISTER_COMPONENTS = 4;
  D3D11_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
  D3D11_VS_OUTPUT_REGISTER_COUNT = 32;
  D3D11_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10;
  D3D11_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25;
  D3D11_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25;
  D3D11_1_UAV_SLOT_COUNT = 64;
  D3D11_2_TILED_RESOURCE_TILE_SIZE_IN_BYTES = 65536;
  D3D11_APPEND_ALIGNED_ELEMENT = $FFFFFFFF;
  D3D11_FILTER_REDUCTION_TYPE_MASK = $3;
  D3D11_FILTER_REDUCTION_TYPE_SHIFT = 7;
  D3D11_FILTER_TYPE_MASK = $3;
  D3D11_MIN_FILTER_SHIFT = 4;
  D3D11_MAG_FILTER_SHIFT = 2;
  D3D11_MIP_FILTER_SHIFT = 0;
  D3D11_COMPARISON_FILTERING_BIT = $80;
  D3D11_ANISOTROPIC_FILTERING_BIT = $40;
  D3D11_SDK_VERSION = 7;
  D3D11_PACKED_TILE = $FFFFFFFF;

  D3D11_INPUT_PER_VERTEX_DATA = 0;
  D3D11_INPUT_PER_INSTANCE_DATA = 1;

  D3D11_FILL_WIREFRAME = 2;
  D3D11_FILL_SOLID = 3;

  D3D11_CULL_NONE = 1;
  D3D11_CULL_FRONT = 2;
  D3D11_CULL_BACK = 3;

  D3D11_RESOURCE_DIMENSION_UNKNOWN = 0;
  D3D11_RESOURCE_DIMENSION_BUFFER = 1;
  D3D11_RESOURCE_DIMENSION_TEXTURE1D = 2;
  D3D11_RESOURCE_DIMENSION_TEXTURE2D = 3;
  D3D11_RESOURCE_DIMENSION_TEXTURE3D = 4;

  D3D11_DSV_DIMENSION_UNKNOWN = 0;
  D3D11_DSV_DIMENSION_TEXTURE1D = 1;
  D3D11_DSV_DIMENSION_TEXTURE1DARRAY = 2;
  D3D11_DSV_DIMENSION_TEXTURE2D = 3;
  D3D11_DSV_DIMENSION_TEXTURE2DARRAY = 4;
  D3D11_DSV_DIMENSION_TEXTURE2DMS = 5;
  D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY = 6;

  D3D11_RTV_DIMENSION_UNKNOWN = 0;
  D3D11_RTV_DIMENSION_BUFFER = 1;
  D3D11_RTV_DIMENSION_TEXTURE1D = 2;
  D3D11_RTV_DIMENSION_TEXTURE1DARRAY = 3;
  D3D11_RTV_DIMENSION_TEXTURE2D = 4;
  D3D11_RTV_DIMENSION_TEXTURE2DARRAY = 5;
  D3D11_RTV_DIMENSION_TEXTURE2DMS = 6;
  D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY = 7;
  D3D11_RTV_DIMENSION_TEXTURE3D = 8;

  D3D11_UAV_DIMENSION_UNKNOWN = 0;
  D3D11_UAV_DIMENSION_BUFFER = 1;
  D3D11_UAV_DIMENSION_TEXTURE1D = 2;
  D3D11_UAV_DIMENSION_TEXTURE1DARRAY = 3;
  D3D11_UAV_DIMENSION_TEXTURE2D = 4;
  D3D11_UAV_DIMENSION_TEXTURE2DARRAY = 5;
  D3D11_UAV_DIMENSION_TEXTURE3D = 8;

  D3D11_USAGE_DEFAULT = 0;
  D3D11_USAGE_IMMUTABLE = 1;
  D3D11_USAGE_DYNAMIC = 2;
  D3D11_USAGE_STAGING = 3;

  D3D11_BIND_VERTEX_BUFFER = $1;
  D3D11_BIND_INDEX_BUFFER = $2;
  D3D11_BIND_CONSTANT_BUFFER = $4;
  D3D11_BIND_SHADER_RESOURCE = $8;
  D3D11_BIND_STREAM_OUTPUT = $10;
  D3D11_BIND_RENDER_TARGET = $20;
  D3D11_BIND_DEPTH_STENCIL = $40;
  D3D11_BIND_UNORDERED_ACCESS = $80;
  D3D11_BIND_DECODER = $200;
  D3D11_BIND_VIDEO_ENCODER = $400;

  D3D11_CPU_ACCESS_WRITE = $10000;
  D3D11_CPU_ACCESS_READ = $20000;

  D3D11_RESOURCE_MISC_GENERATE_MIPS = $1;
  D3D11_RESOURCE_MISC_SHARED = $2;
  D3D11_RESOURCE_MISC_TEXTURECUBE = $4;
  D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = $10;
  D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = $20;
  D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = $40;
  D3D11_RESOURCE_MISC_RESOURCE_CLAMP = $80;
  D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = $100;
  D3D11_RESOURCE_MISC_GDI_COMPATIBLE = $200;
  D3D11_RESOURCE_MISC_SHARED_NTHANDLE = $800;
  D3D11_RESOURCE_MISC_RESTRICTED_CONTENT = $1000;
  D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE = $2000;
  D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER = $4000;
  D3D11_RESOURCE_MISC_GUARDED = $8000;
  D3D11_RESOURCE_MISC_TILE_POOL = $20000;
  D3D11_RESOURCE_MISC_TILED = $40000;

  D3D11_MAP_READ = 1;
  D3D11_MAP_WRITE = 2;
  D3D11_MAP_READ_WRITE = 3;
  D3D11_MAP_WRITE_DISCARD = 4;
  D3D11_MAP_WRITE_NO_OVERWRITE = 5;

  D3D11_MAP_FLAG_DO_NOT_WAIT = $100000;

  D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR = $1;

  D3D11_CLEAR_DEPTH = $1;
  D3D11_CLEAR_STENCIL = $2;

  D3D11_COMPARISON_NEVER = 1;
  D3D11_COMPARISON_LESS = 2;
  D3D11_COMPARISON_EQUAL = 3;
  D3D11_COMPARISON_LESS_EQUAL = 4;
  D3D11_COMPARISON_GREATER = 5;
  D3D11_COMPARISON_NOT_EQUAL = 6;
  D3D11_COMPARISON_GREATER_EQUAL = 7;
  D3D11_COMPARISON_ALWAYS = 8;

  D3D11_DEPTH_WRITE_MASK_ZERO = 0;
  D3D11_DEPTH_WRITE_MASK_ALL = 1;

  D3D11_STENCIL_OP_KEEP = 1;
  D3D11_STENCIL_OP_ZERO = 2;
  D3D11_STENCIL_OP_REPLACE = 3;
  D3D11_STENCIL_OP_INCR_SAT = 4;
  D3D11_STENCIL_OP_DECR_SAT = 5;
  D3D11_STENCIL_OP_INVERT = 6;
  D3D11_STENCIL_OP_INCR = 7;
  D3D11_STENCIL_OP_DECR = 8;

  D3D11_BLEND_ZERO = 1;
  D3D11_BLEND_ONE = 2;
  D3D11_BLEND_SRC_COLOR = 3;
  D3D11_BLEND_INV_SRC_COLOR = 4;
  D3D11_BLEND_SRC_ALPHA = 5;
  D3D11_BLEND_INV_SRC_ALPHA = 6;
  D3D11_BLEND_DEST_ALPHA = 7;
  D3D11_BLEND_INV_DEST_ALPHA = 8;
  D3D11_BLEND_DEST_COLOR = 9;
  D3D11_BLEND_INV_DEST_COLOR = 10;
  D3D11_BLEND_SRC_ALPHA_SAT = 11;
  D3D11_BLEND_BLEND_FACTOR = 14;
  D3D11_BLEND_INV_BLEND_FACTOR = 15;
  D3D11_BLEND_SRC1_COLOR = 16;
  D3D11_BLEND_INV_SRC1_COLOR = 17;
  D3D11_BLEND_SRC1_ALPHA = 18;
  D3D11_BLEND_INV_SRC1_ALPHA = 19;

  D3D11_BLEND_OP_ADD = 1;
  D3D11_BLEND_OP_SUBTRACT = 2;
  D3D11_BLEND_OP_REV_SUBTRACT = 3;
  D3D11_BLEND_OP_MIN = 4;
  D3D11_BLEND_OP_MAX = 5;

  D3D11_COLOR_WRITE_ENABLE_RED = 1;
  D3D11_COLOR_WRITE_ENABLE_GREEN = 2;
  D3D11_COLOR_WRITE_ENABLE_BLUE = 4;
  D3D11_COLOR_WRITE_ENABLE_ALPHA = 8;
  D3D11_COLOR_WRITE_ENABLE_ALL = D3D11_COLOR_WRITE_ENABLE_RED or D3D11_COLOR_WRITE_ENABLE_GREEN or
    D3D11_COLOR_WRITE_ENABLE_BLUE or D3D11_COLOR_WRITE_ENABLE_ALPHA;

  D3D11_TEXTURECUBE_FACE_POSITIVE_X = 0;
  D3D11_TEXTURECUBE_FACE_NEGATIVE_X = 1;
  D3D11_TEXTURECUBE_FACE_POSITIVE_Y = 2;
  D3D11_TEXTURECUBE_FACE_NEGATIVE_Y = 3;
  D3D11_TEXTURECUBE_FACE_POSITIVE_Z = 4;
  D3D11_TEXTURECUBE_FACE_NEGATIVE_Z = 5;

  D3D11_BUFFEREX_SRV_FLAG_RAW = $1;

  D3D11_DSV_READ_ONLY_DEPTH = $1;
  D3D11_DSV_READ_ONLY_STENCIL = $2;

  D3D11_BUFFER_UAV_FLAG_RAW = $1;
  D3D11_BUFFER_UAV_FLAG_APPEND = $2;
  D3D11_BUFFER_UAV_FLAG_COUNTER = $4;

  D3D11_FILTER_MIN_MAG_MIP_POINT = 0;
  D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = $1;
  D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = $4;
  D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = $5;
  D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = $10;
  D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = $11;
  D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = $14;
  D3D11_FILTER_MIN_MAG_MIP_LINEAR = $15;
  D3D11_FILTER_ANISOTROPIC = $55;
  D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = $80;
  D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = $81;
  D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = $84;
  D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = $85;
  D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = $90;
  D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = $91;
  D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = $94;
  D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = $95;
  D3D11_FILTER_COMPARISON_ANISOTROPIC = $D5;
  D3D11_FILTER_MINIMUM_MIN_MAG_MIP_POINT = $100;
  D3D11_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = $101;
  D3D11_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = $104;
  D3D11_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = $105;
  D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = $110;
  D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = $111;
  D3D11_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = $114;
  D3D11_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = $115;
  D3D11_FILTER_MINIMUM_ANISOTROPIC = $155;
  D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = $180;
  D3D11_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = $181;
  D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = $184;
  D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = $185;
  D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = $190;
  D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = $191;
  D3D11_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = $194;
  D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = $195;
  D3D11_FILTER_MAXIMUM_ANISOTROPIC = $1D5;

  D3D11_FILTER_TYPE_POINT = 0;
  D3D11_FILTER_TYPE_LINEAR = 1;

  D3D11_FILTER_REDUCTION_TYPE_STANDARD = 0;
  D3D11_FILTER_REDUCTION_TYPE_COMPARISON = 1;
  D3D11_FILTER_REDUCTION_TYPE_MINIMUM = 2;
  D3D11_FILTER_REDUCTION_TYPE_MAXIMUM = 3;

  D3D11_TEXTURE_ADDRESS_WRAP = 1;
  D3D11_TEXTURE_ADDRESS_MIRROR = 2;
  D3D11_TEXTURE_ADDRESS_CLAMP = 3;
  D3D11_TEXTURE_ADDRESS_BORDER = 4;
  D3D11_TEXTURE_ADDRESS_MIRROR_ONCE = 5;

  D3D11_FORMAT_SUPPORT_BUFFER = $1;
  D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = $2;
  D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = $4;
  D3D11_FORMAT_SUPPORT_SO_BUFFER = $8;
  D3D11_FORMAT_SUPPORT_TEXTURE1D = $10;
  D3D11_FORMAT_SUPPORT_TEXTURE2D = $20;
  D3D11_FORMAT_SUPPORT_TEXTURE3D = $40;
  D3D11_FORMAT_SUPPORT_TEXTURECUBE = $80;
  D3D11_FORMAT_SUPPORT_SHADER_LOAD = $100;
  D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = $200;
  D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = $400;
  D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = $800;
  D3D11_FORMAT_SUPPORT_MIP = $1000;
  D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = $2000;
  D3D11_FORMAT_SUPPORT_RENDER_TARGET = $4000;
  D3D11_FORMAT_SUPPORT_BLENDABLE = $8000;
  D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = $10000;
  D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = $20000;
  D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = $40000;
  D3D11_FORMAT_SUPPORT_DISPLAY = $80000;
  D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = $100000;
  D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = $200000;
  D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = $400000;
  D3D11_FORMAT_SUPPORT_SHADER_GATHER = $800000;
  D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = $1000000;
  D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = $2000000;
  D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = $4000000;
  D3D11_FORMAT_SUPPORT_DECODER_OUTPUT = $8000000;
  D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT = $10000000;
  D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT = $20000000;
  D3D11_FORMAT_SUPPORT_VIDEO_ENCODER = $40000000;

  D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = $1;
  D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = $2;
  D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = $4;
  D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = $8;
  D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = $10;
  D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = $20;
  D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD = $40;
  D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = $80;
  D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = $100;
  D3D11_FORMAT_SUPPORT2_TILED = $200;
  D3D11_FORMAT_SUPPORT2_SHAREABLE = $400;

  D3D11_ASYNC_GETDATA_DONOTFLUSH = $1;

  D3D11_QUERY_EVENT = 0;
  D3D11_QUERY_OCCLUSION = D3D11_QUERY_EVENT + 1;
  D3D11_QUERY_TIMESTAMP = D3D11_QUERY_OCCLUSION + 1;
  D3D11_QUERY_TIMESTAMP_DISJOINT = D3D11_QUERY_TIMESTAMP + 1;
  D3D11_QUERY_PIPELINE_STATISTICS = D3D11_QUERY_TIMESTAMP_DISJOINT + 1;
  D3D11_QUERY_OCCLUSION_PREDICATE = D3D11_QUERY_PIPELINE_STATISTICS + 1;
  D3D11_QUERY_SO_STATISTICS = D3D11_QUERY_OCCLUSION_PREDICATE + 1;
  D3D11_QUERY_SO_OVERFLOW_PREDICATE = D3D11_QUERY_SO_STATISTICS + 1;
  D3D11_QUERY_SO_STATISTICS_STREAM0 = D3D11_QUERY_SO_OVERFLOW_PREDICATE + 1;
  D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 = D3D11_QUERY_SO_STATISTICS_STREAM0 + 1;
  D3D11_QUERY_SO_STATISTICS_STREAM1 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 + 1;
  D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 = D3D11_QUERY_SO_STATISTICS_STREAM1 + 1;
  D3D11_QUERY_SO_STATISTICS_STREAM2 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 + 1;
  D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 = D3D11_QUERY_SO_STATISTICS_STREAM2 + 1;
  D3D11_QUERY_SO_STATISTICS_STREAM3 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 + 1;
  D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3 = D3D11_QUERY_SO_STATISTICS_STREAM3 + 1;

  D3D11_QUERY_MISC_PREDICATEHINT = $1;

  D3D11_COUNTER_DEVICE_DEPENDENT_0 = $40000000;

  D3D11_COUNTER_TYPE_FLOAT32 = 0;
  D3D11_COUNTER_TYPE_UINT16 = D3D11_COUNTER_TYPE_FLOAT32 + 1;
  D3D11_COUNTER_TYPE_UINT32 = D3D11_COUNTER_TYPE_UINT16 + 1;
  D3D11_COUNTER_TYPE_UINT64 = D3D11_COUNTER_TYPE_UINT32 + 1;

  D3D11_STANDARD_MULTISAMPLE_PATTERN = $FFFFFFFF;
  D3D11_CENTER_MULTISAMPLE_PATTERN = $FFFFFFFE;

  D3D11_DEVICE_CONTEXT_IMMEDIATE = 0;
  D3D11_DEVICE_CONTEXT_DEFERRED = D3D11_DEVICE_CONTEXT_IMMEDIATE + 1;

  D3D11_FEATURE_THREADING = 0;
  D3D11_FEATURE_DOUBLES = D3D11_FEATURE_THREADING + 1;
  D3D11_FEATURE_FORMAT_SUPPORT = D3D11_FEATURE_DOUBLES + 1;
  D3D11_FEATURE_FORMAT_SUPPORT2 = D3D11_FEATURE_FORMAT_SUPPORT + 1;
  D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS = D3D11_FEATURE_FORMAT_SUPPORT2 + 1;
  D3D11_FEATURE_D3D11_OPTIONS = D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS + 1;
  D3D11_FEATURE_ARCHITECTURE_INFO = D3D11_FEATURE_D3D11_OPTIONS + 1;
  D3D11_FEATURE_D3D9_OPTIONS = D3D11_FEATURE_ARCHITECTURE_INFO + 1;
  D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT = D3D11_FEATURE_D3D9_OPTIONS + 1;
  D3D11_FEATURE_D3D9_SHADOW_SUPPORT = D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT + 1;
  D3D11_FEATURE_D3D11_OPTIONS1 = D3D11_FEATURE_D3D9_SHADOW_SUPPORT + 1;
  D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT = D3D11_FEATURE_D3D11_OPTIONS1 + 1;
  D3D11_FEATURE_MARKER_SUPPORT = D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT + 1;
  D3D11_FEATURE_D3D9_OPTIONS1 = D3D11_FEATURE_MARKER_SUPPORT + 1;

  D3D11_SHADER_MIN_PRECISION_10_BIT = $1;
  D3D11_SHADER_MIN_PRECISION_16_BIT = $2;

  D3D11_TILED_RESOURCES_NOT_SUPPORTED = 0;
  D3D11_TILED_RESOURCES_TIER_1 = 1;
  D3D11_TILED_RESOURCES_TIER_2 = 2;

  D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0;
  D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1;
  D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2;
  D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3;
  D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4;
  D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5;
  D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6;
  D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7;
  D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8;

  D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT = $1;
  D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT = $2;

  D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_LINEAR_SPACE = $1;
  D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC = $2;
  D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_RGB_RANGE_CONVERSION = $4;
  D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION = $8;
  D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_NOMINAL_RANGE = $10;

  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL = $1;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION = $2;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY = $4;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE = $8;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LEGACY = $10;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO = $20;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION = $40;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM = $80;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO = $100;

  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS = $1;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST = $2;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE = $4;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION = $8;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION = $10;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT = $20;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_ANAMORPHIC_SCALING = $40;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS_STEREO_ADJUSTMENT = $80;

  D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_INTERLACED = $1;
  D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_PROCAMP = $2;
  D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY = $4;
  D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED = $8;

  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DENOISE = $1;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DERINGING = $2;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_EDGE_ENHANCEMENT = $4;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_COLOR_CORRECTION = $8;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_FLESH_TONE_MAPPING = $10;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_IMAGE_STABILIZATION = $20;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_SUPER_RESOLUTION = $40;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_ANAMORPHIC_SCALING = $80;

  D3D11_VIDEO_PROCESSOR_STEREO_CAPS_MONO_OFFSET = $1;
  D3D11_VIDEO_PROCESSOR_STEREO_CAPS_ROW_INTERLEAVED = $2;
  D3D11_VIDEO_PROCESSOR_STEREO_CAPS_COLUMN_INTERLEAVED = $4;
  D3D11_VIDEO_PROCESSOR_STEREO_CAPS_CHECKERBOARD = $8;
  D3D11_VIDEO_PROCESSOR_STEREO_CAPS_FLIP_MODE = $10;

  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND = $1;
  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB = $2;
  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE = $4;
  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION = $8;
  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE = $10;
  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_FRAME_RATE_CONVERSION = $20;

  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32 = $1;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_22 = $2;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2224 = $4;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2332 = $8;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32322 = $10;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_55 = $20;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_64 = $40;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_87 = $80;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_222222222223 = $100;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_OTHER = $80000000;

  D3D11_CONTENT_PROTECTION_CAPS_SOFTWARE = $1;
  D3D11_CONTENT_PROTECTION_CAPS_HARDWARE = $2;
  D3D11_CONTENT_PROTECTION_CAPS_PROTECTION_ALWAYS_ON = $4;
  D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION = $8;
  D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY = $10;
  D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY = $20;
  D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK = $40;
  D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY = $80;
  D3D11_CONTENT_PROTECTION_CAPS_SEQUENTIAL_CTR_IV = $100;
  D3D11_CONTENT_PROTECTION_CAPS_ENCRYPT_SLICEDATA_ONLY = $200;
  D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT = $400;

  D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS = 0;
  D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST = 1;
  D3D11_VIDEO_PROCESSOR_FILTER_HUE = 2;
  D3D11_VIDEO_PROCESSOR_FILTER_SATURATION = 3;
  D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION = 4;
  D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT = 5;
  D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING = 6;
  D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT = 7;

  D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0;
  D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1;
  D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2;

  D3D11_VIDEO_USAGE_PLAYBACK_NORMAL = 0;
  D3D11_VIDEO_USAGE_OPTIMAL_SPEED = 1;
  D3D11_VIDEO_USAGE_OPTIMAL_QUALITY = 2;

  D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_UNDEFINED = 0;
  D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235 = 1;
  D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255 = 2;

  D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE = 0;
  D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND = 1;
  D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION = 2;
  D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM = 3;

  D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL = 0;
  D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF = 1;
  D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM = 2;

  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO = 0;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL = 1;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL = 2;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE = 3;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET = 4;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED = 5;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED = 6;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD = 7;

  D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE = 0;
  D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0 = 1;
  D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1 = 2;

  D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY = 0;
  D3D11_VIDEO_PROCESSOR_ROTATION_90 = 1;
  D3D11_VIDEO_PROCESSOR_ROTATION_180 = 2;
  D3D11_VIDEO_PROCESSOR_ROTATION_270 = 3;

  D3D11_AUTHENTICATED_CHANNEL_D3D11 = 1;
  D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE = 2;
  D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE = 3;

  D3D11_PROCESSIDTYPE_UNKNOWN = 0;
  D3D11_PROCESSIDTYPE_DWM = 1;
  D3D11_PROCESSIDTYPE_HANDLE = 2;

  D3D11_BUS_TYPE_OTHER = 0;
  D3D11_BUS_TYPE_PCI = $1;
  D3D11_BUS_TYPE_PCIX = $2;
  D3D11_BUS_TYPE_PCIEXPRESS = $3;
  D3D11_BUS_TYPE_AGP = $4;
  D3D11_BUS_IMPL_MODIFIER_INSIDE_OF_CHIPSET = $10000;
  D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = $20000;
  D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = $30000;
  D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = $40000;
  D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = $50000;
  D3D11_BUS_IMPL_MODIFIER_NON_STANDARD = $80000000;

  D3D11_VDOV_DIMENSION_UNKNOWN = 0;
  D3D11_VDOV_DIMENSION_TEXTURE2D = 1;

  D3D11_VPIV_DIMENSION_UNKNOWN = 0;
  D3D11_VPIV_DIMENSION_TEXTURE2D = 1;

  D3D11_VPOV_DIMENSION_UNKNOWN = 0;
  D3D11_VPOV_DIMENSION_TEXTURE2D = 1;
  D3D11_VPOV_DIMENSION_TEXTURE2DARRAY = 2;

  D3D11_CREATE_DEVICE_SINGLETHREADED = $1;
  D3D11_CREATE_DEVICE_DEBUG = $2;
  D3D11_CREATE_DEVICE_SWITCH_TO_REF = $4;
  D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = $8;
  D3D11_CREATE_DEVICE_BGRA_SUPPORT = $20;
  D3D11_CREATE_DEVICE_DEBUGGABLE = $40;
  D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = $80;
  D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = $100;
  D3D11_CREATE_DEVICE_VIDEO_SUPPORT = $800;

  D3D11_COPY_NO_OVERWRITE = $1;
  D3D11_COPY_DISCARD = $2;

  D3D11_LOGIC_OP_CLEAR = 0;
  D3D11_LOGIC_OP_SET = D3D11_LOGIC_OP_CLEAR + 1;
  D3D11_LOGIC_OP_COPY = D3D11_LOGIC_OP_SET + 1;
  D3D11_LOGIC_OP_COPY_INVERTED = D3D11_LOGIC_OP_COPY + 1;
  D3D11_LOGIC_OP_NOOP = D3D11_LOGIC_OP_COPY_INVERTED + 1;
  D3D11_LOGIC_OP_INVERT = D3D11_LOGIC_OP_NOOP + 1;
  D3D11_LOGIC_OP_AND = D3D11_LOGIC_OP_INVERT + 1;
  D3D11_LOGIC_OP_NAND = D3D11_LOGIC_OP_AND + 1;
  D3D11_LOGIC_OP_OR = D3D11_LOGIC_OP_NAND + 1;
  D3D11_LOGIC_OP_NOR = D3D11_LOGIC_OP_OR + 1;
  D3D11_LOGIC_OP_XOR = D3D11_LOGIC_OP_NOR + 1;
  D3D11_LOGIC_OP_EQUIV = D3D11_LOGIC_OP_XOR + 1;
  D3D11_LOGIC_OP_AND_REVERSE = D3D11_LOGIC_OP_EQUIV + 1;
  D3D11_LOGIC_OP_AND_INVERTED = D3D11_LOGIC_OP_AND_REVERSE + 1;
  D3D11_LOGIC_OP_OR_REVERSE = D3D11_LOGIC_OP_AND_INVERTED + 1;
  D3D11_LOGIC_OP_OR_INVERTED = D3D11_LOGIC_OP_OR_REVERSE + 1;

  D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED = $1;

  D3D11_TILE_MAPPING_NO_OVERWRITE = $1;

  D3D11_TILE_RANGE_NULL = $1;
  D3D11_TILE_RANGE_SKIP = $2;
  D3D11_TILE_RANGE_REUSE_SINGLE_TILE = $4;

  D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE = $1;

  D3D11_TILE_COPY_NO_OVERWRITE = $1;
  D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = $2;
  D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = $4;

  D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS = HResult($887C0001);
  D3D11_ERROR_FILE_NOT_FOUND = HResult($887C0002);
  D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS = HResult($887C0003);
  D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD = HResult($887C0004);

  D3D11_CRYPTO_TYPE_AES128_CTR: TGuid = '{9B6BD711-4F74-41C9-9E7B-0BE2D7D93B4F}';
  D3D11_KEY_EXCHANGE_RSAES_OAEP: TGuid = '{C1949895-D72A-4A1D-8E5D-ED857D171520}';

  D3D11_AUTHENTICATED_QUERY_PROTECTION: TGuid = '{A84EB584-C495-48AA-B94D-8BD2D6FBCE05}';
  D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE: TGuid = '{BC1B18A5-B1FB-42AB-BD94-B5828B4BF7BE}';
  D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE: TGuid = '{EC1C539D-8CFF-4E2A-BCC4-F5692F99F480}';
  D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION: TGuid = '{2634499E-D018-4D74-AC17-7F724059528D}';
  D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT: TGuid = '{0DB207B3-9450-46A6-82DE-1B96D44F9CF2}';
  D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS: TGuid = '{649BBADB-F0F4-4639-A15B-24393FC3ABAC}';
  D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT: TGuid = '{012F0BD6-E662-4474-BEFD-AA53E5143C6D}';
  D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT: TGuid = '{2C042B5E-8C07-46D5-AABE-8F75CBAD4C31}';
  D3D11_AUTHENTICATED_QUERY_OUTPUT_ID: TGuid = '{839DDCA3-9B4E-41E4-B053-892BD2A11EE7}';
  D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ATTRIBUTES: TGuid = '{6214D9D2-432C-4ABB-9FCE-216EEA269E3B}';
  D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT: TGuid = '{B30F7066-203C-4B07-93FC-CEAAFD61241E}';
  D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID: TGuid = '{F83A5958-E986-4BDA-BEB0-411F6A7A01B7}';
  D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE: TGuid = '{EC1791C7-DAD3-4F15-9EC3-FAA93D60D4F0}';
  D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE: TGuid = '{06114BDB-3523-470A-8DCA-FBC2845154F0}';
  D3D11_AUTHENTICATED_CONFIGURE_PROTECTION: TGuid = '{50455658-3F47-4362-BF99-BFDFCDE9ED29}';
  D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION: TGuid = '{6346CC54-2CFC-4AD4-8224-D15837DE7700}';
  D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE: TGuid = '{0772D047-1B40-48E8-9CA6-B5F510DE9F01}';
  D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE: TGuid = '{41FFF286-6AE0-4D43-9D55-A46E9EFD158A}';

  D3D11_DECODER_PROFILE_MPEG2_MOCOMP: TGuid = '{E6A9F44B-61B0-4563-9EA4-63D2A3C6FE66}';
  D3D11_DECODER_PROFILE_MPEG2_IDCT: TGuid = '{BF22AD00-03EA-4690-8077-473346209B7E}';
  D3D11_DECODER_PROFILE_MPEG2_VLD: TGuid = '{EE27417F-5E28-4E65-BEEA-1D26B508ADC9}';
  D3D11_DECODER_PROFILE_MPEG1_VLD: TGuid = '{6F3EC719-3735-42CC-8063-65CC3CB36616}';
  D3D11_DECODER_PROFILE_MPEG2and1_VLD: TGuid = '{86695F12-340E-4F04-9FD3-9253DD327460}';
  D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT: TGuid = '{1B81BE64-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_H264_MOCOMP_FGT: TGuid = '{1B81BE65-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_H264_IDCT_NOFGT: TGuid = '{1B81BE66-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_H264_IDCT_FGT: TGuid = '{1B81BE67-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_H264_VLD_NOFGT: TGuid = '{1B81BE68-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_H264_VLD_FGT: TGuid = '{1B81BE69-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT: TGuid = '{D5F04FF9-3418-45D8-9561-32A76AAE2DDD}';
  D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT: TGuid = '{D79BE8DA-0CF1-4C81-B82A-69A4E236F43D}';
  D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT: TGuid = '{F9AACCBB-C2B6-4CFC-8779-5707B1760552}';
  D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT: TGuid = '{705B9D82-76CF-49D6-B7E6-AC8872DB013C}';
  D3D11_DECODER_PROFILE_WMV8_POSTPROC: TGuid = '{1B81BE80-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_WMV8_MOCOMP: TGuid = '{1B81BE81-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_WMV9_POSTPROC: TGuid = '{1B81BE90-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_WMV9_MOCOMP: TGuid = '{1B81BE91-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_WMV9_IDCT: TGuid = '{1B81BE94-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_VC1_POSTPROC: TGuid = '{1B81BEA0-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_VC1_MOCOMP: TGuid = '{1B81BEA1-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_VC1_IDCT: TGuid = '{1B81BEA2-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_VC1_VLD: TGuid = '{1B81BEA3-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_VC1_D2010: TGuid = '{1B81BEA4-A0C7-11D3-B984-00C04F2E73C5}';
  D3D11_DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE: TGuid = '{EFD64D74-C9E8-41D7-A5E9-E9B0E39FA319}';
  D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC: TGuid = '{ED418A9F-010D-4EDA-9AE3-9A65358D8D2E}';
  D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC: TGuid = '{AB998B5B-4258-44A9-9FEB-94E597A6BAAE}';
  D3D11_DECODER_PROFILE_HEVC_VLD_MAIN: TGuid = '{5B11D51B-2F4C-4452-BCC3-09F2A1160CC0}';
  D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10: TGuid = '{107AF0E0-EF1A-4D19-ABA8-67A163073D13}';

  SID_ID3D11DeviceChild = '{1841E5C8-16B0-489B-BCC8-44CFB0D5DEAE}';
  SID_ID3D11DepthStencilState = '{03823EFB-8D8F-4E1C-9AA2-F64BB2CBFDF1}';
  SID_ID3D11BlendState = '{75B68FAA-347D-4159-8F45-A0640F01CD9A}';
  SID_ID3D11RasterizerState = '{9BB4AB81-AB1A-4D8F-B506-FC04200B6EE7}';
  SID_ID3D11Resource = '{DC8E63F3-D12B-4952-B47B-5E45026A862D}';
  SID_ID3D11Buffer = '{48570B85-D1EE-4FCD-A250-EB350722B037}';
  SID_ID3D11Texture1D = '{F8FB5C27-C6B3-4F75-A4C8-439AF2EF564C}';
  SID_ID3D11Texture2D = '{6F15AAF2-D208-4E89-9AB4-489535D34F9C}';
  SID_ID3D11Texture3D = '{037E866E-F56D-4357-A8AF-9DABBE6E250E}';
  SID_ID3D11View = '{839D1216-BB2E-412B-B7F4-A9DBEBE08ED1}';
  SID_ID3D11ShaderResourceView = '{B0E06FE0-8192-4E1A-B1CA-36D7414710B2}';
  SID_ID3D11RenderTargetView = '{DFDBA067-0B8D-4865-875B-D7B4516CC164}';
  SID_ID3D11DepthStencilView = '{9FDAC92A-1876-48C3-AFAD-25B94F84A9B6}';
  SID_ID3D11UnorderedAccessView = '{28ACF509-7F5C-48F6-8611-F316010A6380}';
  SID_ID3D11VertexShader = '{3B301D64-D678-4289-8897-22F8928B72F3}';
  SID_ID3D11HullShader = '{8E5C6061-628A-4C8E-8264-BBE45CB3D5DD}';
  SID_ID3D11DomainShader = '{F582C508-0F36-490C-9977-31EECE268CFA}';
  SID_ID3D11GeometryShader = '{38325B96-EFFB-4022-BA02-2E795B70275C}';
  SID_ID3D11PixelShader = '{EA82E40D-51DC-4F33-93D4-DB7C9125AE8C}';
  SID_ID3D11ComputeShader = '{4F5B196E-C2BD-495E-BD01-1FDED38E4969}';
  SID_ID3D11InputLayout = '{E4819DDC-4CF0-4025-BD26-5DE82A3E07B7}';
  SID_ID3D11SamplerState = '{DA6FEA51-564C-4487-9810-F0D0F9B4E3A5}';
  SID_ID3D11Asynchronous = '{4B35D0CD-1E15-4258-9C98-1B1333F6DD3B}';
  SID_ID3D11Query = '{D6C00747-87B7-425E-B84D-44D108560AFD}';
  SID_ID3D11Predicate = '{9EB576DD-9F77-4D86-81AA-8BAB5FE490E2}';
  SID_ID3D11Counter = '{6E8C49FB-A371-4770-B440-29086022B741}';
  SID_ID3D11ClassInstance = '{A6CD7FAA-B0B7-4A2F-9436-8662A65797CB}';
  SID_ID3D11ClassLinkage = '{DDF57CBA-9543-46E4-A12B-F207A0FE7FED}';
  SID_ID3D11CommandList = '{A24BC4D1-769E-43F7-8013-98FF566C18E2}';
  SID_ID3D11DeviceContext = '{C0BFA96C-E089-44FB-8EAF-26F8796190DA}';
  SID_ID3D11VideoDecoder = '{3C9C5B51-995D-48D1-9B8D-FA5CAEDED65C}';
  SID_ID3D11VideoProcessorEnumerator = '{31627037-53AB-4200-9061-05FAA9AB45F9}';
  SID_ID3D11VideoProcessor = '{1D7B0652-185F-41C6-85CE-0C5BE3D4AE6C}';
  SID_ID3D11AuthenticatedChannel = '{3015A308-DCBD-47AA-A747-192486D14D4A}';
  SID_ID3D11CryptoSession = '{9B32F9AD-BDCC-40A6-A39D-D5C865845720}';
  SID_ID3D11VideoDecoderOutputView = '{C2931AEA-2A85-4F20-860F-FBA1FD256E18}';
  SID_ID3D11VideoProcessorInputView = '{11EC5A5F-51DC-4945-AB34-6E8C21300EA5}';
  SID_ID3D11VideoProcessorOutputView = '{A048285E-25A9-4527-BD93-D68B68C44254}';
  SID_ID3D11VideoContext = '{61F21C45-3C0E-4A74-9CEA-67100D9AD5E4}';
  SID_ID3D11VideoDevice = '{10EC4D5B-975A-4689-B9E4-D0AAC30FE333}';
  SID_ID3D11Device = '{DB6F6DDB-AC77-4E88-8253-819DF9BBF140}';
  SID_ID3D11BlendState1 = '{CC86FABE-DA55-401D-85E7-E3C9DE2877E9}';
  SID_ID3D11RasterizerState1 = '{1217D7A6-5039-418C-B042-9CBE256AFD6E}';
  SID_ID3DDeviceContextState = '{5C1E0D8A-7C23-48F9-8C59-A92958CEFF11}';
  SID_ID3D11DeviceContext1 = '{BB2C6FAA-B5FB-4082-8E6B-388B8CFA90E1}';
  SID_ID3D11Device1 = '{A04BFB29-08EF-43D6-A49C-A9BDBDCBE686}';
  SID_ID3DUserDefinedAnnotation = '{B2DAAD8B-03D4-4DBF-95EB-32AB4B63D0AB}';
  SID_ID3D11DeviceContext2 = '{420D5B32-B90C-4DA4-BEF0-359F6A24A83A}';
  SID_ID3D11Device2 = '{9D06DFFA-D1E5-4D07-83A8-1BB123F2F841}';

  IID_ID3D11DeviceChild: TGuid = SID_ID3D11DeviceChild;
  IID_ID3D11DepthStencilState: TGuid = SID_ID3D11DepthStencilState;
  IID_ID3D11BlendState: TGuid = SID_ID3D11BlendState;
  IID_ID3D11RasterizerState: TGuid = SID_ID3D11RasterizerState;
  IID_ID3D11Resource: TGuid = SID_ID3D11Resource;
  IID_ID3D11Buffer: TGuid = SID_ID3D11Buffer;
  IID_ID3D11Texture1D: TGuid = SID_ID3D11Texture1D;
  IID_ID3D11Texture2D: TGuid = SID_ID3D11Texture2D;
  IID_ID3D11Texture3D: TGuid = SID_ID3D11Texture3D;
  IID_ID3D11View: TGuid = SID_ID3D11View;
  IID_ID3D11ShaderResourceView: TGuid = SID_ID3D11ShaderResourceView;
  IID_ID3D11RenderTargetView: TGuid = SID_ID3D11RenderTargetView;
  IID_ID3D11DepthStencilView: TGuid = SID_ID3D11DepthStencilView;
  IID_ID3D11UnorderedAccessView: TGuid = SID_ID3D11UnorderedAccessView;
  IID_ID3D11VertexShader: TGuid = SID_ID3D11VertexShader;
  IID_ID3D11HullShader: TGuid = SID_ID3D11HullShader;
  IID_ID3D11DomainShader: TGuid = SID_ID3D11DomainShader;
  IID_ID3D11GeometryShader: TGuid = SID_ID3D11GeometryShader;
  IID_ID3D11PixelShader: TGuid = SID_ID3D11PixelShader;
  IID_ID3D11ComputeShader: TGuid = SID_ID3D11ComputeShader;
  IID_ID3D11InputLayout: TGuid = SID_ID3D11InputLayout;
  IID_ID3D11SamplerState: TGuid = SID_ID3D11SamplerState;
  IID_ID3D11Asynchronous: TGuid = SID_ID3D11Asynchronous;
  IID_ID3D11Query: TGuid = SID_ID3D11Query;
  IID_ID3D11Predicate: TGuid = SID_ID3D11Predicate;
  IID_ID3D11Counter: TGuid = SID_ID3D11Counter;
  IID_ID3D11ClassInstance: TGuid = SID_ID3D11ClassInstance;
  IID_ID3D11ClassLinkage: TGuid = SID_ID3D11ClassLinkage;
  IID_ID3D11CommandList: TGuid = SID_ID3D11CommandList;
  IID_ID3D11DeviceContext: TGuid = SID_ID3D11DeviceContext;
  IID_ID3D11VideoDecoder: TGuid = SID_ID3D11VideoDecoder;
  IID_ID3D11VideoProcessorEnumerator: TGuid = SID_ID3D11VideoProcessorEnumerator;
  IID_ID3D11VideoProcessor: TGuid = SID_ID3D11VideoProcessor;
  IID_ID3D11AuthenticatedChannel: TGuid = SID_ID3D11AuthenticatedChannel;
  IID_ID3D11CryptoSession: TGuid = SID_ID3D11CryptoSession;
  IID_ID3D11VideoDecoderOutputView: TGuid = SID_ID3D11VideoDecoderOutputView;
  IID_ID3D11VideoProcessorInputView: TGuid = SID_ID3D11VideoProcessorInputView;
  IID_ID3D11VideoProcessorOutputView: TGuid = SID_ID3D11VideoProcessorOutputView;
  IID_ID3D11VideoContext: TGuid = SID_ID3D11VideoContext;
  IID_ID3D11VideoDevice: TGuid = SID_ID3D11VideoDevice;
  IID_ID3D11Device: TGuid = SID_ID3D11Device;
  IID_ID3D11BlendState1: TGuid = SID_ID3D11BlendState1;
  IID_ID3D11RasterizerState1: TGuid = SID_ID3D11RasterizerState1;
  IID_ID3DDeviceContextState: TGuid = SID_ID3DDeviceContextState;
  IID_ID3D11DeviceContext1: TGuid = SID_ID3D11DeviceContext1;
  IID_ID3D11Device1: TGuid = SID_ID3D11Device1;
  IID_ID3DUserDefinedAnnotation: TGuid = SID_ID3DUserDefinedAnnotation;
  IID_ID3D11DeviceContext2: TGuid = SID_ID3D11DeviceContext2;
  IID_ID3D11Device2: TGuid = SID_ID3D11Device2;

type
  PID3D11Resource = ^ID3D11Resource;
  ID3D11Resource = interface;

  PID3D11ClassLinkage = ^ID3D11ClassLinkage;
  ID3D11ClassLinkage = interface;

  PID3D11VideoProcessorInputView = ^ID3D11VideoProcessorInputView;
  ID3D11VideoProcessorInputView = interface;

  PID3D11Device = ^ID3D11Device;
  ID3D11Device = interface;

  PD3D11_PRIMITIVE_TOPOLOGY = ^D3D11_PRIMITIVE_TOPOLOGY;
  D3D11_PRIMITIVE_TOPOLOGY = D3D_PRIMITIVE_TOPOLOGY;

  PD3D11_PRIMITIVE = ^D3D11_PRIMITIVE;
  D3D11_PRIMITIVE = D3D_PRIMITIVE;

  PD3D11_SRV_DIMENSION = ^D3D11_SRV_DIMENSION;
  D3D11_SRV_DIMENSION = D3D_SRV_DIMENSION;

  PD3D11_RECT = ^D3D11_RECT;
  D3D11_RECT = TRect;

  PAPP_DEPRECATED_HRESULT = ^APP_DEPRECATED_HRESULT;
  APP_DEPRECATED_HRESULT = HResult;

  PD3D11_INPUT_CLASSIFICATION = ^D3D11_INPUT_CLASSIFICATION;
  D3D11_INPUT_CLASSIFICATION = LongWord;

  PD3D11_FILL_MODE = ^D3D11_FILL_MODE;
  D3D11_FILL_MODE = LongWord;

  PD3D11_CULL_MODE = ^D3D11_CULL_MODE;
  D3D11_CULL_MODE = LongWord;

  PD3D11_RESOURCE_DIMENSION = ^D3D11_RESOURCE_DIMENSION;
  D3D11_RESOURCE_DIMENSION = LongWord;

  PD3D11_DSV_DIMENSION = ^D3D11_DSV_DIMENSION;
  D3D11_DSV_DIMENSION = LongWord;

  PD3D11_RTV_DIMENSION = ^D3D11_RTV_DIMENSION;
  D3D11_RTV_DIMENSION = LongWord;

  PD3D11_UAV_DIMENSION = ^D3D11_UAV_DIMENSION;
  D3D11_UAV_DIMENSION = LongWord;

  PD3D11_USAGE = ^D3D11_USAGE;
  D3D11_USAGE = LongWord;

  PD3D11_BIND_FLAG = ^D3D11_BIND_FLAG;
  D3D11_BIND_FLAG = LongWord;

  PD3D11_CPU_ACCESS_FLAG = ^D3D11_CPU_ACCESS_FLAG;
  D3D11_CPU_ACCESS_FLAG = LongWord;

  PD3D11_RESOURCE_MISC_FLAG = ^D3D11_RESOURCE_MISC_FLAG;
  D3D11_RESOURCE_MISC_FLAG = LongWord;

  PD3D11_MAP = ^D3D11_MAP;
  D3D11_MAP = LongWord;

  PD3D11_MAP_FLAG = ^D3D11_MAP_FLAG;
  D3D11_MAP_FLAG = LongWord;

  PD3D11_RAISE_FLAG = ^D3D11_RAISE_FLAG;
  D3D11_RAISE_FLAG = LongWord;

  PD3D11_CLEAR_FLAG = ^D3D11_CLEAR_FLAG;
  D3D11_CLEAR_FLAG = LongWord;

  PD3D11_COMPARISON_FUNC = ^D3D11_COMPARISON_FUNC;
  D3D11_COMPARISON_FUNC = LongWord;

  PD3D11_DEPTH_WRITE_MASK = ^D3D11_DEPTH_WRITE_MASK;
  D3D11_DEPTH_WRITE_MASK = LongWord;

  PD3D11_STENCIL_OP = ^D3D11_STENCIL_OP;
  D3D11_STENCIL_OP = LongWord;

  PD3D11_BLEND = ^D3D11_BLEND;
  D3D11_BLEND = LongWord;

  PD3D11_BLEND_OP = ^D3D11_BLEND_OP;
  D3D11_BLEND_OP = LongWord;

  PD3D11_COLOR_WRITE_ENABLE = ^D3D11_COLOR_WRITE_ENABLE;
  D3D11_COLOR_WRITE_ENABLE = LongWord;

  PD3D11_TEXTURECUBE_FACE = ^D3D11_TEXTURECUBE_FACE;
  D3D11_TEXTURECUBE_FACE = LongWord;

  PD3D11_BUFFEREX_SRV_FLAG = ^D3D11_BUFFEREX_SRV_FLAG;
  D3D11_BUFFEREX_SRV_FLAG = LongWord;

  PD3D11_DSV_FLAG = ^D3D11_DSV_FLAG;
  D3D11_DSV_FLAG = LongWord;

  PD3D11_BUFFER_UAV_FLAG = ^D3D11_BUFFER_UAV_FLAG;
  D3D11_BUFFER_UAV_FLAG = LongWord;

  PD3D11_FILTER = ^D3D11_FILTER;
  D3D11_FILTER = LongWord;

  PD3D11_FILTER_TYPE = ^D3D11_FILTER_TYPE;
  D3D11_FILTER_TYPE = LongWord;

  PD3D11_FILTER_REDUCTION_TYPE = ^D3D11_FILTER_REDUCTION_TYPE;
  D3D11_FILTER_REDUCTION_TYPE = LongWord;

  PD3D11_TEXTURE_ADDRESS_MODE = ^D3D11_TEXTURE_ADDRESS_MODE;
  D3D11_TEXTURE_ADDRESS_MODE = LongWord;

  PD3D11_FORMAT_SUPPORT = ^D3D11_FORMAT_SUPPORT;
  D3D11_FORMAT_SUPPORT = LongWord;

  PD3D11_FORMAT_SUPPORT2 = ^D3D11_FORMAT_SUPPORT2;
  D3D11_FORMAT_SUPPORT2 = LongWord;

  PD3D11_ASYNC_GETDATA_FLAG = ^D3D11_ASYNC_GETDATA_FLAG;
  D3D11_ASYNC_GETDATA_FLAG = LongWord;

  PD3D11_QUERY = ^D3D11_QUERY;
  D3D11_QUERY = LongWord;

  PD3D11_QUERY_MISC_FLAG = ^D3D11_QUERY_MISC_FLAG;
  D3D11_QUERY_MISC_FLAG = LongWord;

  PD3D11_COUNTER = ^D3D11_COUNTER;
  D3D11_COUNTER = LongWord;

  PD3D11_COUNTER_TYPE = ^D3D11_COUNTER_TYPE;
  D3D11_COUNTER_TYPE = LongWord;

  PD3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS = ^D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS;
  D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS = LongWord;

  PD3D11_DEVICE_CONTEXT_TYPE = ^D3D11_DEVICE_CONTEXT_TYPE;
  D3D11_DEVICE_CONTEXT_TYPE = LongWord;

  PD3D11_FEATURE = ^D3D11_FEATURE;
  D3D11_FEATURE = LongWord;

  PD3D11_SHADER_MIN_PRECISION_SUPPORT = ^D3D11_SHADER_MIN_PRECISION_SUPPORT;
  D3D11_SHADER_MIN_PRECISION_SUPPORT = LongWord;

  PD3D11_TILED_RESOURCES_TIER = ^D3D11_TILED_RESOURCES_TIER;
  D3D11_TILED_RESOURCES_TIER = LongWord;

  PD3D11_VIDEO_DECODER_BUFFER_TYPE = ^D3D11_VIDEO_DECODER_BUFFER_TYPE;
  D3D11_VIDEO_DECODER_BUFFER_TYPE = LongWord;

  PD3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT = ^D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT;
  D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT = LongWord;

  PD3D11_VIDEO_PROCESSOR_DEVICE_CAPS = ^D3D11_VIDEO_PROCESSOR_DEVICE_CAPS;
  D3D11_VIDEO_PROCESSOR_DEVICE_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_FEATURE_CAPS = ^D3D11_VIDEO_PROCESSOR_FEATURE_CAPS;
  D3D11_VIDEO_PROCESSOR_FEATURE_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_FILTER_CAPS = ^D3D11_VIDEO_PROCESSOR_FILTER_CAPS;
  D3D11_VIDEO_PROCESSOR_FILTER_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_FORMAT_CAPS = ^D3D11_VIDEO_PROCESSOR_FORMAT_CAPS;
  D3D11_VIDEO_PROCESSOR_FORMAT_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS = ^D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS;
  D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_STEREO_CAPS = ^D3D11_VIDEO_PROCESSOR_STEREO_CAPS;
  D3D11_VIDEO_PROCESSOR_STEREO_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS = ^D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS;
  D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_ITELECINE_CAPS = ^D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS;
  D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS = LongWord;

  PD3D11_CONTENT_PROTECTION_CAPS = ^D3D11_CONTENT_PROTECTION_CAPS;
  D3D11_CONTENT_PROTECTION_CAPS = LongWord;

  PD3D11_VIDEO_PROCESSOR_FILTER = ^D3D11_VIDEO_PROCESSOR_FILTER;
  D3D11_VIDEO_PROCESSOR_FILTER = LongWord;

  PD3D11_VIDEO_FRAME_FORMAT = ^D3D11_VIDEO_FRAME_FORMAT;
  D3D11_VIDEO_FRAME_FORMAT = LongWord;

  PD3D11_VIDEO_USAGE = ^D3D11_VIDEO_USAGE;
  D3D11_VIDEO_USAGE = LongWord;

  PD3D11_VIDEO_PROCESSOR_NOMINAL_RANGE = ^D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE;
  D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE = LongWord;

  PD3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE = ^D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE;
  D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE = LongWord;

  PD3D11_VIDEO_PROCESSOR_OUTPUT_RATE = ^D3D11_VIDEO_PROCESSOR_OUTPUT_RATE;
  D3D11_VIDEO_PROCESSOR_OUTPUT_RATE = LongWord;

  PD3D11_VIDEO_PROCESSOR_STEREO_FORMAT = ^D3D11_VIDEO_PROCESSOR_STEREO_FORMAT;
  D3D11_VIDEO_PROCESSOR_STEREO_FORMAT = LongWord;

  PD3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE = ^D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE;
  D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE = LongWord;

  PD3D11_VIDEO_PROCESSOR_ROTATION = ^D3D11_VIDEO_PROCESSOR_ROTATION;
  D3D11_VIDEO_PROCESSOR_ROTATION = LongWord;

  PD3D11_AUTHENTICATED_CHANNEL_TYPE = ^D3D11_AUTHENTICATED_CHANNEL_TYPE;
  D3D11_AUTHENTICATED_CHANNEL_TYPE = LongWord;

  PD3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE = ^D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE;
  D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE = LongWord;

  PD3D11_BUS_TYPE = ^D3D11_BUS_TYPE;
  D3D11_BUS_TYPE = LongWord;

  PD3D11_VDOV_DIMENSION = ^D3D11_VDOV_DIMENSION;
  D3D11_VDOV_DIMENSION = LongWord;

  PD3D11_VPIV_DIMENSION = ^D3D11_VPIV_DIMENSION;
  D3D11_VPIV_DIMENSION = LongWord;

  PD3D11_VPOV_DIMENSION = ^D3D11_VPOV_DIMENSION;
  D3D11_VPOV_DIMENSION = LongWord;

  PD3D11_CREATE_DEVICE_FLAG = ^D3D11_CREATE_DEVICE_FLAG;
  D3D11_CREATE_DEVICE_FLAG = LongWord;

  PD3D11_COPY_FLAGS = ^D3D11_COPY_FLAGS;
  D3D11_COPY_FLAGS = LongWord;

  PD3D11_LOGIC_OP = ^D3D11_LOGIC_OP;
  D3D11_LOGIC_OP = LongWord;

  PD3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG = ^D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG;
  D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG = LongWord;

  PD3D11_TILE_MAPPING_FLAG = ^D3D11_TILE_MAPPING_FLAG;
  D3D11_TILE_MAPPING_FLAG = LongWord;

  PD3D11_TILE_RANGE_FLAG = ^D3D11_TILE_RANGE_FLAG;
  D3D11_TILE_RANGE_FLAG = LongWord;

  PD3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG = ^D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG;
  D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG = LongWord;

  PD3D11_TILE_COPY_FLAG = ^D3D11_TILE_COPY_FLAG;
  D3D11_TILE_COPY_FLAG = LongWord;

  PD3D11_VIDEO_PROCESSOR_COLOR_SPACE = ^D3D11_VIDEO_PROCESSOR_COLOR_SPACE;
  D3D11_VIDEO_PROCESSOR_COLOR_SPACE = LongWord;

  PD3D11_AUTHENTICATED_PROTECTION_FLAGS = ^D3D11_AUTHENTICATED_PROTECTION_FLAGS;
  D3D11_AUTHENTICATED_PROTECTION_FLAGS = LongWord;

  PD3D11_INPUT_ELEMENT_DESC = ^D3D11_INPUT_ELEMENT_DESC;
  D3D11_INPUT_ELEMENT_DESC = record
    SemanticName: PAnsiChar;
    SemanticIndex: LongWord;
    Format: DXGI_FORMAT;
    InputSlot: LongWord;
    AlignedByteOffset: LongWord;
    InputSlotClass: D3D11_INPUT_CLASSIFICATION;
    InstanceDataStepRate: LongWord;
  end;

  PD3D11_SO_DECLARATION_ENTRY = ^D3D11_SO_DECLARATION_ENTRY;
  D3D11_SO_DECLARATION_ENTRY = record
    Stream: LongWord;
    SemanticName: PAnsiChar;
    SemanticIndex: LongWord;
    StartComponent: Byte;
    ComponentCount: Byte;
    OutputSlot: Byte;
  end;

  PD3D11_VIEWPORT = ^D3D11_VIEWPORT;
  D3D11_VIEWPORT = record
    TopLeftX: Single;
    TopLeftY: Single;
    Width: Single;
    Height: Single;
    MinDepth: Single;
    MaxDepth: Single;
  end;

  PD3D11_BOX = ^D3D11_BOX;
  D3D11_BOX = record
    Left: LongWord;
    Top: LongWord;
    Front: LongWord;
    Right: LongWord;
    Bottom: LongWord;
    Back: LongWord;
  end;

  PD3D11_DEPTH_STENCILOP_DESC = ^D3D11_DEPTH_STENCILOP_DESC;
  D3D11_DEPTH_STENCILOP_DESC = record
    StencilFailOp: D3D11_STENCIL_OP;
    StencilDepthFailOp: D3D11_STENCIL_OP;
    StencilPassOp: D3D11_STENCIL_OP;
    StencilFunc: D3D11_COMPARISON_FUNC;
  end;

  PD3D11_DEPTH_STENCIL_DESC = ^D3D11_DEPTH_STENCIL_DESC;
  D3D11_DEPTH_STENCIL_DESC = record
    DepthEnable: LongBool;
    DepthWriteMask: D3D11_DEPTH_WRITE_MASK;
    DepthFunc: D3D11_COMPARISON_FUNC;
    StencilEnable: LongBool;
    StencilReadMask: Byte;
    StencilWriteMask: Byte;
    FrontFace: D3D11_DEPTH_STENCILOP_DESC;
    BackFace: D3D11_DEPTH_STENCILOP_DESC;
  end;

  PD3D11_RENDER_TARGET_BLEND_DESC = ^D3D11_RENDER_TARGET_BLEND_DESC;
  D3D11_RENDER_TARGET_BLEND_DESC = record
    BlendEnable: LongBool;
    SrcBlend: D3D11_BLEND;
    DestBlend: D3D11_BLEND;
    BlendOp: D3D11_BLEND_OP;
    SrcBlendAlpha: D3D11_BLEND;
    DestBlendAlpha: D3D11_BLEND;
    BlendOpAlpha: D3D11_BLEND_OP;
    RenderTargetWriteMask: Byte;
  end;

  PD3D11_BLEND_DESC = ^D3D11_BLEND_DESC;
  D3D11_BLEND_DESC = record
    AlphaToCoverageEnable: LongBool;
    IndependentBlendEnable: LongBool;
    RenderTarget: array[0..7] of D3D11_RENDER_TARGET_BLEND_DESC;
  end;

  PD3D11_RASTERIZER_DESC = ^D3D11_RASTERIZER_DESC;
  D3D11_RASTERIZER_DESC = record
    FillMode: D3D11_FILL_MODE;
    CullMode: D3D11_CULL_MODE;
    FrontCounterClockwise: LongBool;
    DepthBias: LongInt;
    DepthBiasClamp: Single;
    SlopeScaledDepthBias: Single;
    DepthClipEnable: LongBool;
    ScissorEnable: LongBool;
    MultisampleEnable: LongBool;
    AntialiasedLineEnable: LongBool;
  end;

  PD3D11_SUBRESOURCE_DATA = ^D3D11_SUBRESOURCE_DATA;
  D3D11_SUBRESOURCE_DATA = record
    SysMem: Pointer;
    SysMemPitch: LongWord;
    SysMemSlicePitch: LongWord;
  end;

  PD3D11_MAPPED_SUBRESOURCE = ^D3D11_MAPPED_SUBRESOURCE;
  D3D11_MAPPED_SUBRESOURCE = record
    Data: Pointer;
    RowPitch: LongWord;
    DepthPitch: LongWord;
  end;

  PD3D11_BUFFER_DESC = ^D3D11_BUFFER_DESC;
  D3D11_BUFFER_DESC = record
    ByteWidth: LongWord;
    Usage: D3D11_USAGE;
    BindFlags: LongWord;
    CPUAccessFlags: LongWord;
    MiscFlags: LongWord;
    StructureByteStride: LongWord;
  end;

  PD3D11_TEXTURE1D_DESC = ^D3D11_TEXTURE1D_DESC;
  D3D11_TEXTURE1D_DESC = record
    Width: LongWord;
    MipLevels: LongWord;
    ArraySize: LongWord;
    Format: DXGI_FORMAT;
    Usage: D3D11_USAGE;
    BindFlags: LongWord;
    CPUAccessFlags: LongWord;
    MiscFlags: LongWord;
  end;

  PD3D11_TEXTURE2D_DESC = ^D3D11_TEXTURE2D_DESC;
  D3D11_TEXTURE2D_DESC = record
    Width: LongWord;
    Height: LongWord;
    MipLevels: LongWord;
    ArraySize: LongWord;
    Format: DXGI_FORMAT;
    SampleDesc: DXGI_SAMPLE_DESC;
    Usage: D3D11_USAGE;
    BindFlags: LongWord;
    CPUAccessFlags: LongWord;
    MiscFlags: LongWord;
  end;

  PD3D11_TEXTURE3D_DESC = ^D3D11_TEXTURE3D_DESC;
  D3D11_TEXTURE3D_DESC = record
    Width: LongWord;
    Height: LongWord;
    Depth: LongWord;
    MipLevels: LongWord;
    Format: DXGI_FORMAT;
    Usage: D3D11_USAGE;
    BindFlags: LongWord;
    CPUAccessFlags: LongWord;
    MiscFlags: LongWord;
  end;

  PD3D11_BUFFER_SRV = ^D3D11_BUFFER_SRV;
  D3D11_BUFFER_SRV = record
    case Integer of
      0: (FirstElement: LongWord;
          NumElements: LongWord);
      1: (ElementOffset: LongWord;
          ElementWidth: LongWord);
  end;

  PD3D11_BUFFEREX_SRV = ^D3D11_BUFFEREX_SRV;
  D3D11_BUFFEREX_SRV = record
    FirstElement: LongWord;
    NumElements: LongWord;
    Flags: LongWord;
  end;

  PD3D11_TEX1D_SRV = ^D3D11_TEX1D_SRV;
  D3D11_TEX1D_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
  end;

  PD3D11_TEX1D_ARRAY_SRV = ^D3D11_TEX1D_ARRAY_SRV;
  D3D11_TEX1D_ARRAY_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX2D_SRV = ^D3D11_TEX2D_SRV;
  D3D11_TEX2D_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
  end;

  PD3D11_TEX2D_ARRAY_SRV = ^D3D11_TEX2D_ARRAY_SRV;
  D3D11_TEX2D_ARRAY_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX3D_SRV = ^D3D11_TEX3D_SRV;
  D3D11_TEX3D_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
  end;

  PD3D11_TEXCUBE_SRV = ^D3D11_TEXCUBE_SRV;
  D3D11_TEXCUBE_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
  end;

  PD3D11_TEXCUBE_ARRAY_SRV = ^D3D11_TEXCUBE_ARRAY_SRV;
  D3D11_TEXCUBE_ARRAY_SRV = record
    MostDetailedMip: LongWord;
    MipLevels: LongWord;
    First2DArrayFace: LongWord;
    NumCubes: LongWord;
  end;

  PD3D11_TEX2DMS_SRV = ^D3D11_TEX2DMS_SRV;
  D3D11_TEX2DMS_SRV = record
    UnusedField_NothingToDefine: LongWord;
  end;

  PD3D11_TEX2DMS_ARRAY_SRV = ^D3D11_TEX2DMS_ARRAY_SRV;
  D3D11_TEX2DMS_ARRAY_SRV = record
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_SHADER_RESOURCE_VIEW_DESC = ^D3D11_SHADER_RESOURCE_VIEW_DESC;
  D3D11_SHADER_RESOURCE_VIEW_DESC = record
    Format: DXGI_FORMAT;
    ViewDimension: D3D11_SRV_DIMENSION;
    case Integer of
      0: (Buffer: D3D11_BUFFER_SRV);
      1: (Texture1D: D3D11_TEX1D_SRV);
      2: (Texture1DArray: D3D11_TEX1D_ARRAY_SRV);
      3: (Texture2D: D3D11_TEX2D_SRV);
      4: (Texture2DArray: D3D11_TEX2D_ARRAY_SRV);
      5: (Texture2DMS: D3D11_TEX2DMS_SRV);
      6: (Texture2DMSArray: D3D11_TEX2DMS_ARRAY_SRV);
      7: (Texture3D: D3D11_TEX3D_SRV);
      8: (TextureCube: D3D11_TEXCUBE_SRV);
      9: (TextureCubeArray: D3D11_TEXCUBE_ARRAY_SRV);
      10: (BufferEx: D3D11_BUFFEREX_SRV);
  end;

  PD3D11_BUFFER_RTV = ^D3D11_BUFFER_RTV;
  D3D11_BUFFER_RTV = record
  case Integer of
    0: (FirstElement: LongWord;
        NumElements: LongWord);
    1: (ElementOffset: LongWord;
        ElementWidth: LongWord);
  end;

  PD3D11_TEX1D_RTV = ^D3D11_TEX1D_RTV;
  D3D11_TEX1D_RTV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX1D_ARRAY_RTV = ^D3D11_TEX1D_ARRAY_RTV;
  D3D11_TEX1D_ARRAY_RTV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX2D_RTV = ^D3D11_TEX2D_RTV;
  D3D11_TEX2D_RTV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX2DMS_RTV = ^D3D11_TEX2DMS_RTV;
  D3D11_TEX2DMS_RTV = record
    UnusedField_NothingToDefine: LongWord;
  end;

  PD3D11_TEX2D_ARRAY_RTV = ^D3D11_TEX2D_ARRAY_RTV;
  D3D11_TEX2D_ARRAY_RTV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX2DMS_ARRAY_RTV = ^D3D11_TEX2DMS_ARRAY_RTV;
  D3D11_TEX2DMS_ARRAY_RTV = record
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX3D_RTV = ^D3D11_TEX3D_RTV;
  D3D11_TEX3D_RTV = record
    MipSlice: LongWord;
    FirstWSlice: LongWord;
    WSize: LongWord;
  end;

  PD3D11_RENDER_TARGET_VIEW_DESC = ^D3D11_RENDER_TARGET_VIEW_DESC;
  D3D11_RENDER_TARGET_VIEW_DESC = record
    Format: DXGI_FORMAT;
    ViewDimension: D3D11_RTV_DIMENSION;
    case Integer of
      0: (Buffer: D3D11_BUFFER_RTV);
      1: (Texture1D: D3D11_TEX1D_RTV);
      2: (Texture1DArray: D3D11_TEX1D_ARRAY_RTV);
      3: (Texture2D: D3D11_TEX2D_RTV);
      4: (Texture2DArray: D3D11_TEX2D_ARRAY_RTV);
      5: (Texture2DMS: D3D11_TEX2DMS_RTV);
      6: (Texture2DMSArray: D3D11_TEX2DMS_ARRAY_RTV);
      7: (Texture3D: D3D11_TEX3D_RTV);
  end;

  PD3D11_TEX1D_DSV = ^D3D11_TEX1D_DSV;
  D3D11_TEX1D_DSV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX1D_ARRAY_DSV = ^D3D11_TEX1D_ARRAY_DSV;
  D3D11_TEX1D_ARRAY_DSV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX2D_DSV = ^D3D11_TEX2D_DSV;
  D3D11_TEX2D_DSV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX2D_ARRAY_DSV = ^D3D11_TEX2D_ARRAY_DSV;
  D3D11_TEX2D_ARRAY_DSV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX2DMS_DSV = ^D3D11_TEX2DMS_DSV;
  D3D11_TEX2DMS_DSV = record
    UnusedField_NothingToDefine: LongWord;
  end;

  PD3D11_TEX2DMS_ARRAY_DSV = ^D3D11_TEX2DMS_ARRAY_DSV;
  D3D11_TEX2DMS_ARRAY_DSV = record
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_DEPTH_STENCIL_VIEW_DESC = ^D3D11_DEPTH_STENCIL_VIEW_DESC;
  D3D11_DEPTH_STENCIL_VIEW_DESC = record
    Format: DXGI_FORMAT;
    ViewDimension: D3D11_DSV_DIMENSION;
    Flags: LongWord;
    case Integer of
      0: (Texture1D: D3D11_TEX1D_DSV);
      1: (Texture1DArray: D3D11_TEX1D_ARRAY_DSV);
      2: (Texture2D: D3D11_TEX2D_DSV);
      3: (Texture2DArray: D3D11_TEX2D_ARRAY_DSV);
      4: (Texture2DMS: D3D11_TEX2DMS_DSV);
      5: (Texture2DMSArray: D3D11_TEX2DMS_ARRAY_DSV);
  end;

  PD3D11_BUFFER_UAV = ^D3D11_BUFFER_UAV;
  D3D11_BUFFER_UAV = record
    FirstElement: LongWord;
    NumElements: LongWord;
    Flags: LongWord;
  end;

  PD3D11_TEX1D_UAV = ^D3D11_TEX1D_UAV;
  D3D11_TEX1D_UAV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX1D_ARRAY_UAV = ^D3D11_TEX1D_ARRAY_UAV;
  D3D11_TEX1D_ARRAY_UAV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX2D_UAV = ^D3D11_TEX2D_UAV;
  D3D11_TEX2D_UAV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX2D_ARRAY_UAV = ^D3D11_TEX2D_ARRAY_UAV;
  D3D11_TEX2D_ARRAY_UAV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_TEX3D_UAV = ^D3D11_TEX3D_UAV;
  D3D11_TEX3D_UAV = record
    MipSlice: LongWord;
    FirstWSlice: LongWord;
    WSize: LongWord;
  end;

  PD3D11_UNORDERED_ACCESS_VIEW_DESC = ^D3D11_UNORDERED_ACCESS_VIEW_DESC;
  D3D11_UNORDERED_ACCESS_VIEW_DESC = record
    Format: DXGI_FORMAT;
    ViewDimension: D3D11_UAV_DIMENSION;
    case Integer of
      0: (Buffer: D3D11_BUFFER_UAV);
      1: (Texture1D: D3D11_TEX1D_UAV);
      2: (Texture1DArray: D3D11_TEX1D_ARRAY_UAV);
      3: (Texture2D: D3D11_TEX2D_UAV);
      4: (Texture2DArray: D3D11_TEX2D_ARRAY_UAV);
      5: (Texture3D: D3D11_TEX3D_UAV);
  end;

  PD3D11_SAMPLER_DESC = ^D3D11_SAMPLER_DESC;
  D3D11_SAMPLER_DESC = record
    Filter: D3D11_FILTER;
    AddressU: D3D11_TEXTURE_ADDRESS_MODE;
    AddressV: D3D11_TEXTURE_ADDRESS_MODE;
    AddressW: D3D11_TEXTURE_ADDRESS_MODE;
    MipLODBias: Single;
    MaxAnisotropy: LongWord;
    ComparisonFunc: D3D11_COMPARISON_FUNC;
    BorderColor: array[0..3] of Single;
    MinLOD: Single;
    MaxLOD: Single;
  end;

  PD3D11_QUERY_DESC = ^D3D11_QUERY_DESC;
  D3D11_QUERY_DESC = record
    Query: D3D11_QUERY;
    MiscFlags: LongWord;
  end;

  PD3D11_QUERY_DATA_TIMESTAMP_DISJOINT = ^D3D11_QUERY_DATA_TIMESTAMP_DISJOINT;
  D3D11_QUERY_DATA_TIMESTAMP_DISJOINT = record
    Frequency: UInt64;
    Disjoint: LongBool;
  end;

  PD3D11_QUERY_DATA_PIPELINE_STATISTICS = ^D3D11_QUERY_DATA_PIPELINE_STATISTICS;
  D3D11_QUERY_DATA_PIPELINE_STATISTICS = record
    IAVertices: UInt64;
    IAPrimitives: UInt64;
    VSInvocations: UInt64;
    GSInvocations: UInt64;
    GSPrimitives: UInt64;
    CInvocations: UInt64;
    CPrimitives: UInt64;
    PSInvocations: UInt64;
    HSInvocations: UInt64;
    DSInvocations: UInt64;
    CSInvocations: UInt64;
  end;

  PD3D11_QUERY_DATA_SO_STATISTICS = ^D3D11_QUERY_DATA_SO_STATISTICS;
  D3D11_QUERY_DATA_SO_STATISTICS = record
    NumPrimitivesWritten: UInt64;
    PrimitivesStorageNeeded: UInt64;
  end;

  PD3D11_COUNTER_DESC = ^D3D11_COUNTER_DESC;
  D3D11_COUNTER_DESC = record
    Counter: D3D11_COUNTER;
    MiscFlags: LongWord;
  end;

  PD3D11_COUNTER_INFO = ^D3D11_COUNTER_INFO;
  D3D11_COUNTER_INFO = record
    LastDeviceDependentCounter: D3D11_COUNTER;
    NumSimultaneousCounters: LongWord;
    NumDetectableParallelUnits: Byte;
  end;

  PD3D11_CLASS_INSTANCE_DESC = ^D3D11_CLASS_INSTANCE_DESC;
  D3D11_CLASS_INSTANCE_DESC = record
    InstanceId: LongWord;
    InstanceIndex: LongWord;
    TypeId: LongWord;
    ConstantBuffer: LongWord;
    BaseConstantBufferOffset: LongWord;
    BaseTexture: LongWord;
    BaseSampler: LongWord;
    Created: LongBool;
  end;

  PD3D11_FEATURE_DATA_THREADING = ^D3D11_FEATURE_DATA_THREADING;
  D3D11_FEATURE_DATA_THREADING = record
    DriverConcurrentCreates: LongBool;
    DriverCommandLists: LongBool;
  end;

  PD3D11_FEATURE_DATA_DOUBLES = ^D3D11_FEATURE_DATA_DOUBLES;
  D3D11_FEATURE_DATA_DOUBLES = record
    DoublePrecisionFloatShaderOps: LongBool;
  end;

  PD3D11_FEATURE_DATA_FORMAT_SUPPORT = ^D3D11_FEATURE_DATA_FORMAT_SUPPORT;
  D3D11_FEATURE_DATA_FORMAT_SUPPORT = record
    InFormat: DXGI_FORMAT;
    OutFormatSupport: LongWord;
  end;

  PD3D11_FEATURE_DATA_FORMAT_SUPPORT2 = ^D3D11_FEATURE_DATA_FORMAT_SUPPORT2;
  D3D11_FEATURE_DATA_FORMAT_SUPPORT2 = record
    InFormat: DXGI_FORMAT;
    OutFormatSupport2: LongWord;
  end;

  PD3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS = ^D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS;
  D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS = record
    ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x: LongBool;
  end;

  PD3D11_FEATURE_DATA_D3D11_OPTIONS = ^D3D11_FEATURE_DATA_D3D11_OPTIONS;
  D3D11_FEATURE_DATA_D3D11_OPTIONS = record
    OutputMergerLogicOp: LongBool;
    UAVOnlyRenderingForcedSampleCount: LongBool;
    DiscardAPIsSeenByDriver: LongBool;
    FlagsForUpdateAndCopySeenByDriver: LongBool;
    ClearView: LongBool;
    CopyWithOverlap: LongBool;
    ConstantBufferPartialUpdate: LongBool;
    ConstantBufferOffsetting: LongBool;
    MapNoOverwriteOnDynamicConstantBuffer: LongBool;
    MapNoOverwriteOnDynamicBufferSRV: LongBool;
    MultisampleRTVWithForcedSampleCountOne: LongBool;
    SAD4ShaderInstructions: LongBool;
    ExtendedDoublesShaderInstructions: LongBool;
    ExtendedResourceSharing: LongBool;
  end;

  PD3D11_FEATURE_DATA_ARCHITECTURE_INFO = ^D3D11_FEATURE_DATA_ARCHITECTURE_INFO;
  D3D11_FEATURE_DATA_ARCHITECTURE_INFO = record
    TileBasedDeferredRenderer: LongBool;
  end;

  PD3D11_FEATURE_DATA_D3D9_OPTIONS = ^D3D11_FEATURE_DATA_D3D9_OPTIONS;
  D3D11_FEATURE_DATA_D3D9_OPTIONS = record
    FullNonPow2TextureSupport: LongBool;
  end;

  PD3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT = ^D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT;
  D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT = record
    SupportsDepthAsTextureWithLessEqualComparisonFilter: LongBool;
  end;

  PD3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT = ^D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT;
  D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT = record
    PixelShaderMinPrecision: LongWord;
    AllOtherShaderStagesMinPrecision: LongWord;
  end;

  PD3D11_FEATURE_DATA_D3D11_OPTIONS1 = ^D3D11_FEATURE_DATA_D3D11_OPTIONS1;
  D3D11_FEATURE_DATA_D3D11_OPTIONS1 = record
    TiledResourcesTier: D3D11_TILED_RESOURCES_TIER;
    MinMaxFiltering: LongBool;
    ClearViewAlsoSupportsDepthOnlyFormats: LongBool;
    MapOnDefaultBuffers: LongBool;
  end;

  PD3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT = ^D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT;
  D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT = record
    SimpleInstancingSupported: LongBool;
  end;

  PD3D11_FEATURE_DATA_MARKER_SUPPORT = ^D3D11_FEATURE_DATA_MARKER_SUPPORT;
  D3D11_FEATURE_DATA_MARKER_SUPPORT = record
    Profile: LongBool;
  end;

  PD3D11_FEATURE_DATA_D3D9_OPTIONS1 = ^D3D11_FEATURE_DATA_D3D9_OPTIONS1;
  D3D11_FEATURE_DATA_D3D9_OPTIONS1 = record
    FullNonPow2TextureSupported: LongBool;
    DepthAsTextureWithLessEqualComparisonFilterSupported: LongBool;
    SimpleInstancingSupported: LongBool;
    TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported: LongBool;
  end;

  PD3D11_VIDEO_DECODER_DESC = ^D3D11_VIDEO_DECODER_DESC;
  D3D11_VIDEO_DECODER_DESC = record
    Guid: TGuid;
    SampleWidth: LongWord;
    SampleHeight: LongWord;
    OutputFormat: DXGI_FORMAT;
  end;

  PD3D11_VIDEO_DECODER_CONFIG = ^D3D11_VIDEO_DECODER_CONFIG;
  D3D11_VIDEO_DECODER_CONFIG = record
    GuidConfigBitstreamEncryption: TGuid;
    GuidConfigMBcontrolEncryption: TGuid;
    GuidConfigResidDiffEncryption: TGuid;
    ConfigBitstreamRaw: LongWord;
    ConfigMBcontrolRasterOrder: LongWord;
    ConfigResidDiffHost: LongWord;
    ConfigSpatialResid8: LongWord;
    ConfigResid8Subtraction: LongWord;
    ConfigSpatialHost8or9Clipping: LongWord;
    ConfigSpatialResidInterleaved: LongWord;
    ConfigIntraResidUnsigned: LongWord;
    ConfigResidDiffAccelerator: LongWord;
    ConfigHostInverseScan: LongWord;
    ConfigSpecificIDCT: LongWord;
    Config4GroupedCoefs: LongWord;
    ConfigMinRenderTargetBuffCount: Word;
    ConfigDecoderSpecific: Word;
  end;

  PD3D11_AES_CTR_IV = ^D3D11_AES_CTR_IV;
  D3D11_AES_CTR_IV = record
    IV: UInt64;
    Count: UInt64;
  end;

  PD3D11_ENCRYPTED_BLOCK_INFO = ^D3D11_ENCRYPTED_BLOCK_INFO;
  D3D11_ENCRYPTED_BLOCK_INFO = record
    NumEncryptedBytesAtBeginning: LongWord;
    NumBytesInSkipPattern: LongWord;
    NumBytesInEncryptPattern: LongWord;
  end;

  PD3D11_VIDEO_DECODER_BUFFER_DESC = ^D3D11_VIDEO_DECODER_BUFFER_DESC;
  D3D11_VIDEO_DECODER_BUFFER_DESC = record
    BufferType: D3D11_VIDEO_DECODER_BUFFER_TYPE;
    BufferIndex: LongWord;
    DataOffset: LongWord;
    DataSize: LongWord;
    FirstMBaddress: LongWord;
    NumMBsInBuffer: LongWord;
    Width: LongWord;
    Height: LongWord;
    Stride: LongWord;
    ReservedBits: LongWord;
    IV: Pointer;
    IVSize: LongWord;
    PartialEncryption: LongBool;
    EncryptedBlockInfo: D3D11_ENCRYPTED_BLOCK_INFO;
  end;

  PD3D11_VIDEO_DECODER_EXTENSION = ^D3D11_VIDEO_DECODER_EXTENSION;
  D3D11_VIDEO_DECODER_EXTENSION = record
    &Function: LongWord;
    PrivateInputData: Pointer;
    PrivateInputDataSize: LongWord;
    PrivateOutputData: Pointer;
    PrivateOutputDataSize: LongWord;
    ResourceCount: LongWord;
    ResourceList: PID3D11Resource;
  end;

  PD3D11_VIDEO_PROCESSOR_CAPS = ^D3D11_VIDEO_PROCESSOR_CAPS;
  D3D11_VIDEO_PROCESSOR_CAPS = record
    DeviceCaps: LongWord;
    FeatureCaps: LongWord;
    FilterCaps: LongWord;
    InputFormatCaps: LongWord;
    AutoStreamCaps: LongWord;
    StereoCaps: LongWord;
    RateConversionCapsCount: LongWord;
    MaxInputStreams: LongWord;
    MaxStreamStates: LongWord;
  end;

  PD3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS = ^D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS;
  D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS = record
    PastFrames: LongWord;
    FutureFrames: LongWord;
    ProcessorCaps: LongWord;
    ITelecineCaps: LongWord;
    CustomRateCount: LongWord;
  end;

  PD3D11_VIDEO_CONTENT_PROTECTION_CAPS = ^D3D11_VIDEO_CONTENT_PROTECTION_CAPS;
  D3D11_VIDEO_CONTENT_PROTECTION_CAPS = record
    Caps: LongWord;
    KeyExchangeTypeCount: LongWord;
    BlockAlignmentSize: LongWord;
    ProtectedMemorySize: ULONGLONG;
  end;

  PD3D11_VIDEO_PROCESSOR_CUSTOM_RATE = ^D3D11_VIDEO_PROCESSOR_CUSTOM_RATE;
  D3D11_VIDEO_PROCESSOR_CUSTOM_RATE = record
    CustomRate: DXGI_RATIONAL;
    OutputFrames: LongWord;
    InputInterlaced: LongBool;
    InputFramesOrFields: LongWord;
  end;

  PD3D11_VIDEO_PROCESSOR_FILTER_RANGE = ^D3D11_VIDEO_PROCESSOR_FILTER_RANGE;
  D3D11_VIDEO_PROCESSOR_FILTER_RANGE = record
    Minimum: LongInt;
    Maximum: LongInt;
    Default: LongInt;
    Multiplier: Single;
  end;

  PD3D11_VIDEO_PROCESSOR_CONTENT_DESC = ^D3D11_VIDEO_PROCESSOR_CONTENT_DESC;
  D3D11_VIDEO_PROCESSOR_CONTENT_DESC = record
    InputFrameFormat: D3D11_VIDEO_FRAME_FORMAT;
    InputFrameRate: DXGI_RATIONAL;
    InputWidth: LongWord;
    InputHeight: LongWord;
    OutputFrameRate: DXGI_RATIONAL;
    OutputWidth: LongWord;
    OutputHeight: LongWord;
    Usage: D3D11_VIDEO_USAGE;
  end;

  PD3D11_VIDEO_COLOR_RGBA = ^D3D11_VIDEO_COLOR_RGBA;
  D3D11_VIDEO_COLOR_RGBA = record
    R: Single;
    G: Single;
    B: Single;
    A: Single;
  end;

  PD3D11_VIDEO_COLOR_YCbCrA = ^D3D11_VIDEO_COLOR_YCbCrA;
  D3D11_VIDEO_COLOR_YCbCrA = record
    Y: Single;
    Cb: Single;
    Cr: Single;
    A: Single;
  end;

  PD3D11_VIDEO_COLOR = ^D3D11_VIDEO_COLOR;
  D3D11_VIDEO_COLOR = record
  case Integer of
    0: (YCbCr: D3D11_VIDEO_COLOR_YCbCrA);
    1: (RGBA: D3D11_VIDEO_COLOR_RGBA);
  end;

  PD3D11_VIDEO_PROCESSOR_STREAM = ^D3D11_VIDEO_PROCESSOR_STREAM;
  D3D11_VIDEO_PROCESSOR_STREAM = record
    Enable: LongBool;
    OutputIndex: LongWord;
    InputFrameOrField: LongWord;
    PastFrames: LongWord;
    FutureFrames: LongWord;
    PastSurfaces: PID3D11VideoProcessorInputView;
    InputSurface: ID3D11VideoProcessorInputView;
    FutureSurfaces: PID3D11VideoProcessorInputView;
    PastSurfacesRight: PID3D11VideoProcessorInputView;
    InputSurfaceRight: ID3D11VideoProcessorInputView;
    FutureSurfacesRight: PID3D11VideoProcessorInputView;
  end;

  PD3D11_OMAC = ^D3D11_OMAC;
  D3D11_OMAC = record
    Omac: array[0..15] of Byte;
  end;

  PD3D11_AUTHENTICATED_QUERY_INPUT = ^D3D11_AUTHENTICATED_QUERY_INPUT;
  D3D11_AUTHENTICATED_QUERY_INPUT = record
    QueryType: TGuid;
    Channel: THandle;
    SequenceNumber: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_OUTPUT = record
    Omac: D3D11_OMAC;
    QueryType: TGuid;
    Channel: THandle;
    SequenceNumber: LongWord;
    ReturnCode: HResult;
  end;

  PD3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    ProtectionFlags: D3D11_AUTHENTICATED_PROTECTION_FLAGS;
  end;

  PD3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    ChannelType: D3D11_AUTHENTICATED_CHANNEL_TYPE;
  end;

  PD3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    DeviceHandle: THandle;
  end;

  PD3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT = ^D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT;
  D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT = record
    Input: D3D11_AUTHENTICATED_QUERY_INPUT;
    DecoderHandle: THandle;
  end;

  PD3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    DecoderHandle: THandle;
    CryptoSessionHandle: THandle;
    DeviceHandle: THandle;
  end;

  PD3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    RestrictedSharedResourceProcessCount: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT = ^D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT;
  D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT = record
    Input: D3D11_AUTHENTICATED_QUERY_INPUT;
    ProcessIndex: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    ProcessIndex: LongWord;
    ProcessIdentifier: D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE;
    ProcessHandle: THandle;
  end;

  PD3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    UnrestrictedProtectedSharedResourceCount: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT = ^D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT;
  D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT = record
    Input: D3D11_AUTHENTICATED_QUERY_INPUT;
    DeviceHandle: THandle;
    CryptoSessionHandle: THandle;
  end;

  PD3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    DeviceHandle: THandle;
    CryptoSessionHandle: THandle;
    OutputIDCount: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT = ^D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT;
  D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT = record
    Input: D3D11_AUTHENTICATED_QUERY_INPUT;
    DeviceHandle: THandle;
    CryptoSessionHandle: THandle;
    OutputIDIndex: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    DeviceHandle: THandle;
    CryptoSessionHandle: THandle;
    OutputIDIndex: LongWord;
    OutputID: UInt64;
  end;

  PD3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    BusType: D3D11_BUS_TYPE;
    AccessibleInContiguousBlocks: LongBool;
    AccessibleInNonContiguousBlocks: LongBool;
  end;

  PD3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    EncryptionGuidCount: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT = ^D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT;
  D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT = record
    Input: D3D11_AUTHENTICATED_QUERY_INPUT;
    EncryptionGuidIndex: LongWord;
  end;

  PD3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    EncryptionGuidIndex: LongWord;
    EncryptionGuid: TGuid;
  end;

  PD3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT = ^D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT;
  D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT = record
    Output: D3D11_AUTHENTICATED_QUERY_OUTPUT;
    EncryptionGuid: TGuid;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_INPUT = ^D3D11_AUTHENTICATED_CONFIGURE_INPUT;
  D3D11_AUTHENTICATED_CONFIGURE_INPUT = record
    Omac: D3D11_OMAC;
    ConfigureType: TGuid;
    Channel: THandle;
    SequenceNumber: LongWord;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_OUTPUT = ^D3D11_AUTHENTICATED_CONFIGURE_OUTPUT;
  D3D11_AUTHENTICATED_CONFIGURE_OUTPUT = record
    Omac: D3D11_OMAC;
    ConfigureType: TGuid;
    Channel: THandle;
    SequenceNumber: LongWord;
    ReturnCode: HResult;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT = ^D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT;
  D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT = record
    Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT;
    StartSequenceQuery: LongWord;
    StartSequenceConfigure: LongWord;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT = ^D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT;
  D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT = record
    Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT;
    Protections: D3D11_AUTHENTICATED_PROTECTION_FLAGS;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT = ^D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT;
  D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT = record
    Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT;
    DecoderHandle: THandle;
    CryptoSessionHandle: THandle;
    DeviceHandle: THandle;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT = ^D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT;
  D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT = record
    Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT;
    ProcessType: D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE;
    ProcessHandle: THandle;
    AllowAccess: LongBool;
  end;

  PD3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT = ^D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT;
  D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT = record
    Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT;
    EncryptionGuid: TGuid;
  end;

  PD3D11_TEX2D_VDOV = ^D3D11_TEX2D_VDOV;
  D3D11_TEX2D_VDOV = record
    ArraySlice: LongWord;
  end;

  PD3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC = ^D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC;
  D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC = record
    DecodeProfile: TGuid;
    ViewDimension: D3D11_VDOV_DIMENSION;
    Texture2D: D3D11_TEX2D_VDOV;
  end;

  PD3D11_TEX2D_VPIV = ^D3D11_TEX2D_VPIV;
  D3D11_TEX2D_VPIV = record
    MipSlice: LongWord;
    ArraySlice: LongWord;
  end;

  PD3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC = ^D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC;
  D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC = record
    FourCC: LongWord;
    ViewDimension: D3D11_VPIV_DIMENSION;
    Texture2D: D3D11_TEX2D_VPIV;
  end;

  PD3D11_TEX2D_VPOV = ^D3D11_TEX2D_VPOV;
  D3D11_TEX2D_VPOV = record
    MipSlice: LongWord;
  end;

  PD3D11_TEX2D_ARRAY_VPOV = ^D3D11_TEX2D_ARRAY_VPOV;
  D3D11_TEX2D_ARRAY_VPOV = record
    MipSlice: LongWord;
    FirstArraySlice: LongWord;
    ArraySize: LongWord;
  end;

  PD3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC = ^D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC;
  D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC = record
    ViewDimension: D3D11_VPOV_DIMENSION;
    case Integer of
      0: (Texture2D: D3D11_TEX2D_VPOV);
      1: (Texture2DArray: D3D11_TEX2D_ARRAY_VPOV);
  end;

  PD3D11_RENDER_TARGET_BLEND_DESC1 = ^D3D11_RENDER_TARGET_BLEND_DESC1;
  D3D11_RENDER_TARGET_BLEND_DESC1 = record
    BlendEnable: LongBool;
    LogicOpEnable: LongBool;
    SrcBlend: D3D11_BLEND;
    DestBlend: D3D11_BLEND;
    BlendOp: D3D11_BLEND_OP;
    SrcBlendAlpha: D3D11_BLEND;
    DestBlendAlpha: D3D11_BLEND;
    BlendOpAlpha: D3D11_BLEND_OP;
    LogicOp: D3D11_LOGIC_OP;
    RenderTargetWriteMask: Byte;
  end;

  PD3D11_BLEND_DESC1 = ^D3D11_BLEND_DESC1;
  D3D11_BLEND_DESC1 = record
    AlphaToCoverageEnable: LongBool;
    IndependentBlendEnable: LongBool;
    RenderTarget: array[0..7] of D3D11_RENDER_TARGET_BLEND_DESC1;
  end;

  PD3D11_RASTERIZER_DESC1 = ^D3D11_RASTERIZER_DESC1;
  D3D11_RASTERIZER_DESC1 = record
    FillMode: D3D11_FILL_MODE;
    CullMode: D3D11_CULL_MODE;
    FrontCounterClockwise: LongBool;
    DepthBias: LongInt;
    DepthBiasClamp: Single;
    SlopeScaledDepthBias: Single;
    DepthClipEnable: LongBool;
    ScissorEnable: LongBool;
    MultisampleEnable: LongBool;
    AntialiasedLineEnable: LongBool;
    ForcedSampleCount: LongWord;
  end;

  PD3D11_TILED_RESOURCE_COORDINATE = ^D3D11_TILED_RESOURCE_COORDINATE;
  D3D11_TILED_RESOURCE_COORDINATE = record
    X: LongWord;
    Y: LongWord;
    Z: LongWord;
    Subresource: LongWord;
  end;

  PD3D11_TILE_REGION_SIZE = ^D3D11_TILE_REGION_SIZE;
  D3D11_TILE_REGION_SIZE = record
    NumTiles: LongWord;
    UseBox: LongBool;
    Width: LongWord;
    Height: Word;
    Depth: Word;
  end;

  PD3D11_SUBRESOURCE_TILING = ^D3D11_SUBRESOURCE_TILING;
  D3D11_SUBRESOURCE_TILING = record
    WidthInTiles: LongWord;
    HeightInTiles: Word;
    DepthInTiles: Word;
    StartTileIndexInOverallResource: LongWord;
  end;

  PD3D11_TILE_SHAPE = ^D3D11_TILE_SHAPE;
  D3D11_TILE_SHAPE = record
    WidthInTexels: LongWord;
    HeightInTexels: LongWord;
    DepthInTexels: LongWord;
  end;

  PD3D11_PACKED_MIP_DESC = ^D3D11_PACKED_MIP_DESC;
  D3D11_PACKED_MIP_DESC = record
    NumStandardMips: Byte;
    NumPackedMips: Byte;
    NumTilesForPackedMips: LongWord;
    StartTileIndexInOverallResource: LongWord;
  end;

  PID3D11DeviceChild = ^ID3D11DeviceChild;
  ID3D11DeviceChild = interface(IUnknown)
    [SID_ID3D11DeviceChild]
    procedure GetDevice(out Device: ID3D11Device); stdcall;
    function GetPrivateData(const Guid: TGuid; var DataSize: LongWord; Data: Pointer): HResult; stdcall;
    function SetPrivateData(const Guid: TGuid; DataSize: LongWord; Data: Pointer): HResult; stdcall;
    function SetPrivateDataInterface(const Guid: TGuid; Data: IUnknown): HResult; stdcall;
  end;

  PID3D11DepthStencilState = ^ID3D11DepthStencilState;
  ID3D11DepthStencilState = interface(ID3D11DeviceChild)
    [SID_ID3D11DepthStencilState]
    procedure GetDesc(out Desc: D3D11_DEPTH_STENCIL_DESC); stdcall;
  end;

  PID3D11BlendState = ^ID3D11BlendState;
  ID3D11BlendState = interface(ID3D11DeviceChild)
    [SID_ID3D11BlendState]
    procedure GetDesc(out Desc: D3D11_BLEND_DESC); stdcall;
  end;

  PID3D11RasterizerState = ^ID3D11RasterizerState;
  ID3D11RasterizerState = interface(ID3D11DeviceChild)
    [SID_ID3D11RasterizerState]
    procedure GetDesc(out Desc: D3D11_RASTERIZER_DESC); stdcall;
  end;

  ID3D11Resource = interface(ID3D11DeviceChild)
    [SID_ID3D11Resource]
    procedure GetType(out ResourceDimension: D3D11_RESOURCE_DIMENSION); stdcall;
    procedure SetEvictionPriority(EvictionPriority: LongWord); stdcall;
    function GetEvictionPriority: LongWord; stdcall;
  end;

  PID3D11Buffer = ^ID3D11Buffer;
  ID3D11Buffer = interface(ID3D11Resource)
    [SID_ID3D11Buffer]
    procedure GetDesc(out Desc: D3D11_BUFFER_DESC); stdcall;
  end;

  PID3D11Texture1D = ^ID3D11Texture1D;
  ID3D11Texture1D = interface(ID3D11Resource)
    [SID_ID3D11Texture1D]
    procedure GetDesc(out Desc: D3D11_TEXTURE1D_DESC); stdcall;
  end;

  PID3D11Texture2D = ^ID3D11Texture2D;
  ID3D11Texture2D = interface(ID3D11Resource)
    [SID_ID3D11Texture2D]
    procedure GetDesc(out Desc: D3D11_TEXTURE2D_DESC); stdcall;
  end;

  PID3D11Texture3D = ^ID3D11Texture3D;
  ID3D11Texture3D = interface(ID3D11Resource)
    [SID_ID3D11Texture3D]
    procedure GetDesc(out Desc: D3D11_TEXTURE3D_DESC); stdcall;
  end;

  PID3D11View = ^ID3D11View;
  ID3D11View = interface(ID3D11DeviceChild)
    [SID_ID3D11View]
    procedure GetResource(out Resource: ID3D11Resource); stdcall;
  end;

  PID3D11ShaderResourceView = ^ID3D11ShaderResourceView;
  ID3D11ShaderResourceView = interface(ID3D11View)
    [SID_ID3D11ShaderResourceView]
    procedure GetDesc(out Desc: D3D11_SHADER_RESOURCE_VIEW_DESC); stdcall;
  end;

  PID3D11RenderTargetView = ^ID3D11RenderTargetView;
  ID3D11RenderTargetView = interface(ID3D11View)
    [SID_ID3D11RenderTargetView]
    procedure GetDesc(out Desc: D3D11_RENDER_TARGET_VIEW_DESC); stdcall;
  end;

  PID3D11DepthStencilView = ^ID3D11DepthStencilView;
  ID3D11DepthStencilView = interface(ID3D11View)
    [SID_ID3D11DepthStencilView]
    procedure GetDesc(out Desc: D3D11_DEPTH_STENCIL_VIEW_DESC); stdcall;
  end;

  PID3D11UnorderedAccessView = ^ID3D11UnorderedAccessView;
  ID3D11UnorderedAccessView = interface(ID3D11View)
    [SID_ID3D11UnorderedAccessView]
    procedure GetDesc(out Desc: D3D11_UNORDERED_ACCESS_VIEW_DESC); stdcall;
  end;

  PID3D11VertexShader = ^ID3D11VertexShader;
  ID3D11VertexShader = interface(ID3D11DeviceChild)
    [SID_ID3D11VertexShader]
  end;

  PID3D11HullShader = ^ID3D11HullShader;
  ID3D11HullShader = interface(ID3D11DeviceChild)
    [SID_ID3D11HullShader]
  end;

  PID3D11DomainShader = ^ID3D11DomainShader;
  ID3D11DomainShader = interface(ID3D11DeviceChild)
    [SID_ID3D11DomainShader]
  end;

  PID3D11GeometryShader = ^ID3D11GeometryShader;
  ID3D11GeometryShader = interface(ID3D11DeviceChild)
    [SID_ID3D11GeometryShader]
  end;

  PID3D11PixelShader = ^ID3D11PixelShader;
  ID3D11PixelShader = interface(ID3D11DeviceChild)
    [SID_ID3D11PixelShader]
  end;

  PID3D11ComputeShader = ^ID3D11ComputeShader;
  ID3D11ComputeShader = interface(ID3D11DeviceChild)
    [SID_ID3D11ComputeShader]
  end;

  PID3D11InputLayout = ^ID3D11InputLayout;
  ID3D11InputLayout = interface(ID3D11DeviceChild)
    [SID_ID3D11InputLayout]
  end;

  PID3D11SamplerState = ^ID3D11SamplerState;
  ID3D11SamplerState = interface(ID3D11DeviceChild)
    [SID_ID3D11SamplerState]
    procedure GetDesc(out Desc: D3D11_SAMPLER_DESC); stdcall;
  end;

  PID3D11Asynchronous = ^ID3D11Asynchronous;
  ID3D11Asynchronous = interface(ID3D11DeviceChild)
    [SID_ID3D11Asynchronous]
    function GetDataSize: LongWord; stdcall;
  end;

  PID3D11Query = ^ID3D11Query;
  ID3D11Query = interface(ID3D11Asynchronous)
    [SID_ID3D11Query]
    procedure GetDesc(out Desc: D3D11_QUERY_DESC); stdcall;
  end;

  PID3D11Predicate = ^ID3D11Predicate;
  ID3D11Predicate = interface(ID3D11Query)
    [SID_ID3D11Predicate]
  end;

  PID3D11Counter = ^ID3D11Counter;
  ID3D11Counter = interface(ID3D11Asynchronous)
    [SID_ID3D11Counter]
    procedure GetDesc(out Desc: D3D11_COUNTER_DESC); stdcall;
  end;

  PID3D11ClassInstance = ^ID3D11ClassInstance;
  ID3D11ClassInstance = interface(ID3D11DeviceChild)
    [SID_ID3D11ClassInstance]
    procedure GetClassLinkage(out Linkage: ID3D11ClassLinkage); stdcall;
    procedure GetDesc(out Desc: D3D11_CLASS_INSTANCE_DESC); stdcall;
    procedure GetInstanceName(InstanceName: PAnsiChar; var BufferLength: SIZE_T); stdcall;
    procedure GetTypeName(TypeName: PAnsiChar; var BufferLength: SIZE_T); stdcall;
  end;

  ID3D11ClassLinkage = interface(ID3D11DeviceChild)
    [SID_ID3D11ClassLinkage]
    function GetClassInstance(ClassInstanceName: PAnsiChar; InstanceIndex: LongWord;
      out Instance: ID3D11ClassInstance): HResult; stdcall;
    function CreateClassInstance(ClassTypeName: PAnsiChar; ConstantBufferOffset, ConstantVectorOffset, TextureOffset,
      SamplerOffset: LongWord; out Instance: ID3D11ClassInstance): HResult; stdcall;
  end;

  PID3D11CommandList = ^ID3D11CommandList;
  ID3D11CommandList = interface(ID3D11DeviceChild)
    [SID_ID3D11CommandList]
    function GetContextFlags: LongWord; stdcall;
  end;

  PID3D11DeviceContext = ^ID3D11DeviceContext;
  ID3D11DeviceContext = interface(ID3D11DeviceChild)
    [SID_ID3D11DeviceContext]
    procedure VSSetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure PSSetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure PSSetShader(PixelShader: ID3D11PixelShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: LongWord); stdcall;
    procedure PSSetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure VSSetShader(VertexShader: ID3D11VertexShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: LongWord); stdcall;
    procedure DrawIndexed(IndexCount, StartIndexLocation: LongWord; BaseVertexLocation: LongInt); stdcall;
    procedure Draw(VertexCount, StartVertexLocation: LongWord); stdcall;
    function Map(Resource: ID3D11Resource; Subresource: LongWord; MapType: D3D11_MAP; MapFlags: LongWord; 
      out MappedResource: D3D11_MAPPED_SUBRESOURCE): HResult; stdcall;
    procedure Unmap(Resource: ID3D11Resource; Subresource: LongWord); stdcall;
    procedure PSSetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure IASetInputLayout(InputLayout: ID3D11InputLayout); stdcall;
    procedure IASetVertexBuffers(StartSlot, NumBuffers: LongWord; VertexBuffers: PID3D11Buffer; Strides, 
      Offsets: PLongWord); stdcall;
    procedure IASetIndexBuffer(IndexBuffer: ID3D11Buffer; Format: DXGI_FORMAT; Offset: LongWord); stdcall;
    procedure DrawIndexedInstanced(IndexCountPerInstance, InstanceCount, StartIndexLocation: LongWord; 
      BaseVertexLocation: LongInt; StartInstanceLocation: LongWord); stdcall;
    procedure DrawInstanced(VertexCountPerInstance, InstanceCount, StartVertexLocation, 
      StartInstanceLocation: LongWord); stdcall;
    procedure GSSetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure GSSetShader(Shader: ID3D11GeometryShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: LongWord); stdcall;
    procedure IASetPrimitiveTopology(Topology: D3D11_PRIMITIVE_TOPOLOGY); stdcall;
    procedure VSSetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure VSSetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure &Begin(Async: ID3D11Asynchronous); stdcall;
    procedure &End(Async: ID3D11Asynchronous); stdcall;
    function GetData(Async: ID3D11Asynchronous; Data: Pointer; DataSize, GetDataFlags: LongWord): HResult; stdcall;
    procedure SetPredication(Predicate: ID3D11Predicate; PredicateValue: LongBool); stdcall;
    procedure GSSetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure GSSetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure OMSetRenderTargets(NumViews: LongWord; RenderTargetViews: PID3D11RenderTargetView; 
      DepthStencilView: ID3D11DepthStencilView); stdcall;
    procedure OMSetRenderTargetsAndUnorderedAccessViews(NumRTVs: LongWord; RenderTargetViews: PID3D11RenderTargetView; 
      DepthStencilView: ID3D11DepthStencilView; UAVStartSlot, NumUAVs: LongWord; 
      UnorderedAccessViews: PID3D11UnorderedAccessView; UAVInitialCounts: PLongWord); stdcall;
    procedure OMSetBlendState(BlendState: ID3D11BlendState; BlendFactor: PFourSingleArray;
      SampleMask: LongWord); stdcall;
    procedure OMSetDepthStencilState(DepthStencilState: ID3D11DepthStencilState; StencilRef: LongWord); stdcall;
    procedure SOSetTargets(NumBuffers: LongWord; SOTargets: PID3D11Buffer; Offsets: PLongWord); stdcall;
    procedure DrawAuto; stdcall;
    procedure DrawIndexedInstancedIndirect(BufferForArgs: ID3D11Buffer; AlignedByteOffsetForArgs: LongWord); stdcall;
    procedure DrawInstancedIndirect(BufferForArgs: ID3D11Buffer; AlignedByteOffsetForArgs: LongWord); stdcall;
    procedure Dispatch(ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ: LongWord); stdcall;
    procedure DispatchIndirect(BufferForArgs: ID3D11Buffer; AlignedByteOffsetForArgs: LongWord); stdcall;
    procedure RSSetState(RasterizerState: ID3D11RasterizerState); stdcall;
    procedure RSSetViewports(NumViewports: LongWord; Viewports: PD3D11_VIEWPORT); stdcall;
    procedure RSSetScissorRects(NumRects: LongWord; Rects: PD3D11_RECT); stdcall;
    procedure CopySubresourceRegion(DstResource: ID3D11Resource; DstSubresource, DstX, DstY, DstZ: LongWord; 
      SrcResource: ID3D11Resource; SrcSubresource: LongWord; SrcBox: PD3D11_BOX); stdcall;
    procedure CopyResource(DstResource, SrcResource: ID3D11Resource); stdcall;
    procedure UpdateSubresource(DstResource: ID3D11Resource; DstSubresource: LongWord; DstBox: PD3D11_BOX; 
      const SrcData: Pointer; SrcRowPitch, SrcDepthPitch: LongWord); stdcall;
    procedure CopyStructureCount(DstBuffer: ID3D11Buffer; DstAlignedByteOffset: LongWord; 
      SrcView: ID3D11UnorderedAccessView); stdcall;
    procedure ClearRenderTargetView(RenderTargetView: ID3D11RenderTargetView; 
      const ColorRGBA: TFourSingleArray); stdcall;
    procedure ClearUnorderedAccessViewUint(UnorderedAccessView: ID3D11UnorderedAccessView; 
      const Values: TFourLongWordArray); stdcall;
    procedure ClearUnorderedAccessViewFloat(UnorderedAccessView: ID3D11UnorderedAccessView; 
      const Values: TFourSingleArray); stdcall;
    procedure ClearDepthStencilView(DepthStencilView: ID3D11DepthStencilView; ClearFlags: LongWord; Depth: Single; 
      Stencil: Byte); stdcall;
    procedure GenerateMips(ShaderResourceView: ID3D11ShaderResourceView); stdcall;
    procedure SetResourceMinLOD(Resource: ID3D11Resource; MinLOD: Single); stdcall;
    function GetResourceMinLOD(Resource: ID3D11Resource): Single; stdcall;
    procedure ResolveSubresource(DstResource: ID3D11Resource; DstSubresource: LongWord; SrcResource: ID3D11Resource; 
      SrcSubresource: LongWord; Format: DXGI_FORMAT); stdcall;
    procedure ExecuteCommandList(CommandList: ID3D11CommandList; RestoreContextState: LongBool); stdcall;
    procedure HSSetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure HSSetShader(HullShader: ID3D11HullShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: LongWord); stdcall;
    procedure HSSetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure HSSetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure DSSetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure DSSetShader(DomainShader: ID3D11DomainShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: LongWord); stdcall;
    procedure DSSetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure DSSetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure CSSetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure CSSetUnorderedAccessViews(StartSlot, NumUAVs: LongWord; 
      UnorderedAccessViews: PID3D11UnorderedAccessView; UAVInitialCounts: PLongWord); stdcall;
    procedure CSSetShader(ComputeShader: ID3D11ComputeShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: LongWord); stdcall;
    procedure CSSetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure CSSetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure VSGetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure PSGetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure PSGetShader(out PixelShader: ID3D11PixelShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: PLongWord); stdcall;
    procedure PSGetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure VSGetShader(out VertexShader: ID3D11VertexShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: PLongWord); stdcall;
    procedure PSGetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure IAGetInputLayout(out InputLayout: ID3D11InputLayout); stdcall;
    procedure IAGetVertexBuffers(StartSlot, NumBuffers: LongWord; VertexBuffers: PID3D11Buffer; Strides, 
      Offsets: PLongWord); stdcall;
    procedure IAGetIndexBuffer(IndexBuffer: PID3D11Buffer; Format: PDXGI_FORMAT; Offset: PLongWord); stdcall;
    procedure GSGetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure GSGetShader(out GeometryShader: ID3D11GeometryShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: PLongWord); stdcall;
    procedure IAGetPrimitiveTopology(out Topology: D3D11_PRIMITIVE_TOPOLOGY); stdcall;
    procedure VSGetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure VSGetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure GetPredication(Predicate: PID3D11Predicate; PredicateValue: PLongBool); stdcall;
    procedure GSGetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure GSGetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure OMGetRenderTargets(NumViews: LongWord; RenderTargetViews: PID3D11RenderTargetView; 
      DepthStencilView: PID3D11DepthStencilView); stdcall;
    procedure OMGetRenderTargetsAndUnorderedAccessViews(NumRTVs: LongWord; RenderTargetViews: PID3D11RenderTargetView; 
      DepthStencilView: PID3D11DepthStencilView; UAVStartSlot, NumUAVs: LongWord; 
      UnorderedAccessViews: PID3D11UnorderedAccessView); stdcall;
    procedure OMGetBlendState(BlendState: PID3D11BlendState; BlendFactor: PFourSingleArray;
      SampleMask: PLongWord); stdcall;
    procedure OMGetDepthStencilState(DepthStencilState: PID3D11DepthStencilState; StencilRef: PLongWord); stdcall;
    procedure SOGetTargets(NumBuffers: LongWord; SOTargets: PID3D11Buffer); stdcall;
    procedure RSGetState(out RasterizerState: ID3D11RasterizerState); stdcall;
    procedure RSGetViewports(var NumViewports: LongWord; Viewports: PD3D11_VIEWPORT); stdcall;
    procedure RSGetScissorRects(var NumRects: LongWord; Rects: PD3D11_RECT); stdcall;
    procedure HSGetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure HSGetShader(out HullShader: ID3D11HullShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: PLongWord); stdcall;
    procedure HSGetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure HSGetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure DSGetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure DSGetShader(out DomainShader: ID3D11DomainShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: PLongWord); stdcall;
    procedure DSGetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure DSGetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure CSGetShaderResources(StartSlot, NumViews: LongWord; 
      ShaderResourceViews: PID3D11ShaderResourceView); stdcall;
    procedure CSGetUnorderedAccessViews(StartSlot, NumUAVs: LongWord; 
      UnorderedAccessViews: PID3D11UnorderedAccessView); stdcall;
    procedure CSGetShader(out ComputeShader: ID3D11ComputeShader; ClassInstances: PID3D11ClassInstance; 
      NumClassInstances: PLongWord); stdcall;
    procedure CSGetSamplers(StartSlot, NumSamplers: LongWord; Samplers: PID3D11SamplerState); stdcall;
    procedure CSGetConstantBuffers(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer); stdcall;
    procedure ClearState; stdcall;
    procedure Flush; stdcall;
    function GetType: D3D11_DEVICE_CONTEXT_TYPE; stdcall;
    function GetContextFlags: LongWord; stdcall;
    function FinishCommandList(RestoreDeferredContextState: LongBool; 
      CommandList: PID3D11CommandList): HResult; stdcall;
  end;

  PID3D11VideoDecoder = ^ID3D11VideoDecoder;
  ID3D11VideoDecoder = interface(ID3D11DeviceChild)
    [SID_ID3D11VideoDecoder]
    function GetCreationParameters(out VideoDesc: D3D11_VIDEO_DECODER_DESC; 
      out Config: D3D11_VIDEO_DECODER_CONFIG): HResult; stdcall;
    function GetDriverHandle(out DriverHandle: THandle): HResult; stdcall;
  end;

  PID3D11VideoProcessorEnumerator = ^ID3D11VideoProcessorEnumerator;
  ID3D11VideoProcessorEnumerator = interface(ID3D11DeviceChild)
    [SID_ID3D11VideoProcessorEnumerator]
    function GetVideoProcessorContentDesc(out ContentDesc: D3D11_VIDEO_PROCESSOR_CONTENT_DESC): HResult; stdcall;
    function CheckVideoProcessorFormat(Format: DXGI_FORMAT; out Flags: LongWord): HResult; stdcall;
    function GetVideoProcessorCaps(out Caps: D3D11_VIDEO_PROCESSOR_CAPS): HResult; stdcall;
    function GetVideoProcessorRateConversionCaps(TypeIndex: LongWord; 
      out Caps: D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS): HResult; stdcall;
    function GetVideoProcessorCustomRate(TypeIndex, CustomRateIndex: LongWord; 
      out Rate: D3D11_VIDEO_PROCESSOR_CUSTOM_RATE): HResult; stdcall;
    function GetVideoProcessorFilterRange(Filter: D3D11_VIDEO_PROCESSOR_FILTER; 
      out Range: D3D11_VIDEO_PROCESSOR_FILTER_RANGE): HResult; stdcall;
  end;

  PID3D11VideoProcessor = ^ID3D11VideoProcessor;
  ID3D11VideoProcessor = interface(ID3D11DeviceChild)
    [SID_ID3D11VideoProcessor]
    procedure GetContentDesc(out Desc: D3D11_VIDEO_PROCESSOR_CONTENT_DESC); stdcall;
    procedure GetRateConversionCaps(out Caps: D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS); stdcall;
  end;

  PID3D11AuthenticatedChannel = ^ID3D11AuthenticatedChannel;
  ID3D11AuthenticatedChannel = interface(ID3D11DeviceChild)
    [SID_ID3D11AuthenticatedChannel]
    function GetCertificateSize(out CertificateSize: LongWord): HResult; stdcall;
    function GetCertificate(CertificateSize: LongWord; Certificate: Pointer): HResult; stdcall;
    procedure GetChannelHandle(out ChannelHandle: THandle); stdcall;
  end;

  PID3D11CryptoSession = ^ID3D11CryptoSession;
  ID3D11CryptoSession = interface(ID3D11DeviceChild)
    [SID_ID3D11CryptoSession]
    procedure GetCryptoType(out CryptoType: TGuid); stdcall;
    procedure GetDecoderProfile(out DecoderProfile: TGuid); stdcall;
    function GetCertificateSize(out CertificateSize: LongWord): HResult; stdcall;
    function GetCertificate(CertificateSize: LongWord; Certificate: Pointer): HResult; stdcall;
    procedure GetCryptoSessionHandle(out CryptoSessionHandle: THandle); stdcall;
  end;

  PID3D11VideoDecoderOutputView = ^ID3D11VideoDecoderOutputView;
  ID3D11VideoDecoderOutputView = interface(ID3D11View)
    [SID_ID3D11VideoDecoderOutputView]
    procedure GetDesc(out Desc: D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC); stdcall;
  end;

  ID3D11VideoProcessorInputView = interface(ID3D11View)
    [SID_ID3D11VideoProcessorInputView]
    procedure GetDesc(out Desc: D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC); stdcall;
  end;

  PID3D11VideoProcessorOutputView = ^ID3D11VideoProcessorOutputView;
  ID3D11VideoProcessorOutputView = interface(ID3D11View)
    [SID_ID3D11VideoProcessorOutputView]
    procedure GetDesc(out Desc: D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC); stdcall;
  end;

  PID3D11VideoContext = ^ID3D11VideoContext;
  ID3D11VideoContext = interface(ID3D11DeviceChild)
    [SID_ID3D11VideoContext]
    function GetDecoderBuffer(Decoder: ID3D11VideoDecoder; &Type: D3D11_VIDEO_DECODER_BUFFER_TYPE;
      out BufferSize: LongWord; out Buffer): HResult; stdcall;
    function ReleaseDecoderBuffer(Decoder: ID3D11VideoDecoder; 
      &Type: D3D11_VIDEO_DECODER_BUFFER_TYPE): HResult; stdcall;
    function DecoderBeginFrame(Decoder: ID3D11VideoDecoder; View: ID3D11VideoDecoderOutputView; 
      ContentKeySize: LongWord; ContentKey: Pointer): HResult; stdcall;
    function DecoderEndFrame(Decoder: ID3D11VideoDecoder): HResult; stdcall;
    function SubmitDecoderBuffers(Decoder: ID3D11VideoDecoder; NumBuffers: LongWord; 
      BufferDesc: PD3D11_VIDEO_DECODER_BUFFER_DESC): HResult; stdcall;
    function DecoderExtension(Decoder: ID3D11VideoDecoder; 
      const ExtensionData: D3D11_VIDEO_DECODER_EXTENSION): APP_DEPRECATED_HRESULT; stdcall;
    procedure VideoProcessorSetOutputTargetRect(VideoProcessor: ID3D11VideoProcessor; Enable: LongBool; 
      Rect: PRect); stdcall;
    procedure VideoProcessorSetOutputBackgroundColor(VideoProcessor: ID3D11VideoProcessor; YCbCr: LongBool; 
      const Color: D3D11_VIDEO_COLOR); stdcall;
    procedure VideoProcessorSetOutputColorSpace(VideoProcessor: ID3D11VideoProcessor; 
      const ColorSpace: D3D11_VIDEO_PROCESSOR_COLOR_SPACE); stdcall;
    procedure VideoProcessorSetOutputAlphaFillMode(VideoProcessor: ID3D11VideoProcessor; 
      AlphaFillMode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE; StreamIndex: LongWord); stdcall;
    procedure VideoProcessorSetOutputConstriction(VideoProcessor: ID3D11VideoProcessor; Enable: LongBool; 
      Size: TSize); stdcall;
    procedure VideoProcessorSetOutputStereoMode(VideoProcessor: ID3D11VideoProcessor; Enable: LongBool); stdcall;
    function VideoProcessorSetOutputExtension(VideoProcessor: ID3D11VideoProcessor; const ExtensionGuid: TGuid; 
      DataSize: LongWord; const Data: Pointer): APP_DEPRECATED_HRESULT; stdcall;
    procedure VideoProcessorGetOutputTargetRect(VideoProcessor: ID3D11VideoProcessor; out Enabled: LongBool; 
      out Rect: TRect); stdcall;
    procedure VideoProcessorGetOutputBackgroundColor(VideoProcessor: ID3D11VideoProcessor; out YCbCr: LongBool; 
      out Color: D3D11_VIDEO_COLOR); stdcall;
    procedure VideoProcessorGetOutputColorSpace(VideoProcessor: ID3D11VideoProcessor; 
      out ColorSpace: D3D11_VIDEO_PROCESSOR_COLOR_SPACE); stdcall;
    procedure VideoProcessorGetOutputAlphaFillMode(VideoProcessor: ID3D11VideoProcessor; 
      out AlphaFillMode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE; out StreamIndex: LongWord); stdcall;
    procedure VideoProcessorGetOutputConstriction(VideoProcessor: ID3D11VideoProcessor; out Enabled: LongBool; 
      out Size: TSize); stdcall;
    procedure VideoProcessorGetOutputStereoMode(VideoProcessor: ID3D11VideoProcessor; out Enabled: LongBool); stdcall;
    function VideoProcessorGetOutputExtension(VideoProcessor: ID3D11VideoProcessor; const ExtensionGuid: TGuid; 
      DataSize: LongWord; Data: Pointer): APP_DEPRECATED_HRESULT; stdcall;
    procedure VideoProcessorSetStreamFrameFormat(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      FrameFormat: D3D11_VIDEO_FRAME_FORMAT); stdcall;
    procedure VideoProcessorSetStreamColorSpace(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      const ColorSpace: D3D11_VIDEO_PROCESSOR_COLOR_SPACE); stdcall;
    procedure VideoProcessorSetStreamOutputRate(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      OutputRate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE; RepeatFrame: LongBool; CustomRate: PDXGI_RATIONAL); stdcall;
    procedure VideoProcessorSetStreamSourceRect(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; Rect: PRect); stdcall;
    procedure VideoProcessorSetStreamDestRect(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; Rect: PRect); stdcall;
    procedure VideoProcessorSetStreamAlpha(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; Alpha: Single); stdcall;
    procedure VideoProcessorSetStreamPalette(VideoProcessor: ID3D11VideoProcessor; StreamIndex, Count: LongWord; 
      Entries: PLongWord); stdcall;
    procedure VideoProcessorSetStreamPixelAspectRatio(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; SourceAspectRatio, DestinationAspectRatio: PDXGI_RATIONAL); stdcall;
    procedure VideoProcessorSetStreamLumaKey(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; Lower, Upper: Single); stdcall;
    procedure VideoProcessorSetStreamStereoFormat(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; Format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT; LeftViewFrame0, BaseViewFrame0: LongBool; 
      FlipMode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE; MonoOffset: LongInt); stdcall;
    procedure VideoProcessorSetStreamAutoProcessingMode(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool); stdcall;
    procedure VideoProcessorSetStreamFilter(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Filter: D3D11_VIDEO_PROCESSOR_FILTER; Enable: LongBool; Level: LongInt); stdcall;
    function VideoProcessorSetStreamExtension(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      const ExtensionGuid: TGuid; DataSize: LongWord; const Data: Pointer): APP_DEPRECATED_HRESULT; stdcall;
    procedure VideoProcessorGetStreamFrameFormat(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out FrameFormat: D3D11_VIDEO_FRAME_FORMAT); stdcall;
    procedure VideoProcessorGetStreamColorSpace(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out ColorSpace: D3D11_VIDEO_PROCESSOR_COLOR_SPACE); stdcall;
    procedure VideoProcessorGetStreamOutputRate(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out OutputRate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE; out RepeatFrame: LongBool; 
      out CustomRate: DXGI_RATIONAL); stdcall;
    procedure VideoProcessorGetStreamSourceRect(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enabled: LongBool; out Rect: TRect); stdcall;
    procedure VideoProcessorGetStreamDestRect(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enabled: LongBool; out Rect: TRect); stdcall;
    procedure VideoProcessorGetStreamAlpha(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enabled: LongBool; out Alpha: Single); stdcall;
    procedure VideoProcessorGetStreamPalette(VideoProcessor: ID3D11VideoProcessor; StreamIndex, Count: LongWord; 
      Entries: PLongWord); stdcall;
    procedure VideoProcessorGetStreamPixelAspectRatio(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enabled: LongBool; out SourceAspectRatio, DestinationAspectRatio: DXGI_RATIONAL); stdcall;
    procedure VideoProcessorGetStreamLumaKey(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enabled: LongBool; out Lower, Upper: Single); stdcall;
    procedure VideoProcessorGetStreamStereoFormat(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enable: LongBool; out Format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT; out LeftViewFrame0, 
      BaseViewFrame0: LongBool; out FlipMode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE; 
      out MonoOffset: LongInt); stdcall;
    procedure VideoProcessorGetStreamAutoProcessingMode(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enabled: LongBool); stdcall;
    procedure VideoProcessorGetStreamFilter(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Filter: D3D11_VIDEO_PROCESSOR_FILTER; out Enabled: LongBool; out Level: LongInt); stdcall;
    function VideoProcessorGetStreamExtension(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      const ExtensionGuid: TGuid; DataSize: LongWord; Data: Pointer): APP_DEPRECATED_HRESULT; stdcall;
    function VideoProcessorBlt(VideoProcessor: ID3D11VideoProcessor; View: ID3D11VideoProcessorOutputView;
      OutputFrame, StreamCount: LongWord; Streams: PD3D11_VIDEO_PROCESSOR_STREAM): HResult; stdcall;
    function NegotiateCryptoSessionKeyExchange(CryptoSession: ID3D11CryptoSession; DataSize: LongWord; 
      Data: Pointer): HResult; stdcall;
    procedure EncryptionBlt(CryptoSession: ID3D11CryptoSession; SrcSurface, DstSurface: ID3D11Texture2D; 
      IVSize: LongWord; IV: Pointer); stdcall;
    procedure DecryptionBlt(CryptoSession: ID3D11CryptoSession; SrcSurface, DstSurface: ID3D11Texture2D; 
      EncryptedBlockInfo: PD3D11_ENCRYPTED_BLOCK_INFO; ContentKeySize: LongWord; ContentKey: Pointer; 
      IVSize: LongWord; IV: Pointer); stdcall;
    procedure StartSessionKeyRefresh(CryptoSession: ID3D11CryptoSession; RandomNumberSize: LongWord; 
      RandomNumber: Pointer); stdcall;
    procedure FinishSessionKeyRefresh(CryptoSession: ID3D11CryptoSession); stdcall;
    function GetEncryptionBltKey(CryptoSession: ID3D11CryptoSession; KeySize: LongWord; 
      ReadbackKey: Pointer): HResult; stdcall;
    function NegotiateAuthenticatedChannelKeyExchange(Channel: ID3D11AuthenticatedChannel; DataSize: LongWord; 
      Data: Pointer): HResult; stdcall;
    function QueryAuthenticatedChannel(Channel: ID3D11AuthenticatedChannel; InputSize: LongWord; Input: Pointer; 
      OutputSize: LongWord; Output: Pointer): HResult; stdcall;
    function ConfigureAuthenticatedChannel(Channel: ID3D11AuthenticatedChannel; InputSize: LongWord; Input: Pointer; 
      out Output: D3D11_AUTHENTICATED_CONFIGURE_OUTPUT): HResult; stdcall;
    procedure VideoProcessorSetStreamRotation(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      Enable: LongBool; Rotation: D3D11_VIDEO_PROCESSOR_ROTATION); stdcall;
    procedure VideoProcessorGetStreamRotation(VideoProcessor: ID3D11VideoProcessor; StreamIndex: LongWord; 
      out Enable: LongBool; out Rotation: D3D11_VIDEO_PROCESSOR_ROTATION); stdcall;
  end;

  PID3D11VideoDevice = ^ID3D11VideoDevice;
  ID3D11VideoDevice = interface(IUnknown)
    [SID_ID3D11VideoDevice]
    function CreateVideoDecoder(const VideoDesc: D3D11_VIDEO_DECODER_DESC; const Config: D3D11_VIDEO_DECODER_CONFIG; 
      out Decoder: ID3D11VideoDecoder): HResult; stdcall;
    function CreateVideoProcessor(Enum: ID3D11VideoProcessorEnumerator; RateConversionIndex: LongWord; 
      out VideoProcessor: ID3D11VideoProcessor): HResult; stdcall;
    function CreateAuthenticatedChannel(ChannelType: D3D11_AUTHENTICATED_CHANNEL_TYPE; 
      out AuthenticatedChannel: ID3D11AuthenticatedChannel): HResult; stdcall;
    function CreateCryptoSession(const CryptoType: TGuid; DecoderProfile: PGuid; const KeyExchangeType: TGuid;
      out CryptoSession: ID3D11CryptoSession): HResult; stdcall;
    function CreateVideoDecoderOutputView(Resource: ID3D11Resource; const Desc: D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC; 
      VDOVView: PID3D11VideoDecoderOutputView): HResult; stdcall;
    function CreateVideoProcessorInputView(Resource: ID3D11Resource; Enum: ID3D11VideoProcessorEnumerator; 
      const Desc: D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC; VPIView: PID3D11VideoProcessorInputView): HResult; stdcall;
    function CreateVideoProcessorOutputView(Resource: ID3D11Resource; Enum: ID3D11VideoProcessorEnumerator; 
      const Desc: D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC; VPOView: PID3D11VideoProcessorOutputView): HResult; stdcall;
    function CreateVideoProcessorEnumerator(const Desc: D3D11_VIDEO_PROCESSOR_CONTENT_DESC; 
      out Enum: ID3D11VideoProcessorEnumerator): HResult; stdcall;
    function GetVideoDecoderProfileCount: LongWord; stdcall;
    function GetVideoDecoderProfile(Index: LongWord; out DecoderProfile: TGuid): HResult; stdcall;
    function CheckVideoDecoderFormat(const DecoderProfile: TGuid; Format: DXGI_FORMAT; 
      out Supported: LongBool): HResult; stdcall;
    function GetVideoDecoderConfigCount(const Desc: D3D11_VIDEO_DECODER_DESC; out Count: LongWord): HResult; stdcall;
    function GetVideoDecoderConfig(const Desc: D3D11_VIDEO_DECODER_DESC; Index: LongWord; 
      out Config: D3D11_VIDEO_DECODER_CONFIG): HResult; stdcall;
    function GetContentProtectionCaps(CryptoType, DecoderProfile: PGuid;
      out Caps: D3D11_VIDEO_CONTENT_PROTECTION_CAPS): HResult; stdcall;
    function CheckCryptoKeyExchange(const CryptoType: TGuid; DecoderProfile: PGuid; Index: LongWord;
      out KeyExchangeType: TGuid): HResult; stdcall;
    function SetPrivateData(const Guid: TGuid; DataSize: LongWord; Data: Pointer): HResult; stdcall;
    function SetPrivateDataInterface(const Guid: TGuid; Data: IUnknown): HResult; stdcall;
  end;

  ID3D11Device = interface(IUnknown)
    [SID_ID3D11Device]
    function CreateBuffer(const Desc: D3D11_BUFFER_DESC; InitialData: PD3D11_SUBRESOURCE_DATA; 
      Buffer: PID3D11Buffer): HResult; stdcall;
    function CreateTexture1D(const Desc: D3D11_TEXTURE1D_DESC; InitialData: PD3D11_SUBRESOURCE_DATA; 
      Texture1D: PID3D11Texture1D): HResult; stdcall;
    function CreateTexture2D(const Desc: D3D11_TEXTURE2D_DESC; InitialData: PD3D11_SUBRESOURCE_DATA; 
      Texture2D: PID3D11Texture2D): HResult; stdcall;
    function CreateTexture3D(const Desc: D3D11_TEXTURE3D_DESC; InitialData: PD3D11_SUBRESOURCE_DATA; 
      Texture3D: PID3D11Texture3D): HResult; stdcall;
    function CreateShaderResourceView(Resource: ID3D11Resource; Desc: PD3D11_SHADER_RESOURCE_VIEW_DESC; 
      SRView: PID3D11ShaderResourceView): HResult; stdcall;
    function CreateUnorderedAccessView(Resource: ID3D11Resource; Desc: PD3D11_UNORDERED_ACCESS_VIEW_DESC; 
      UAView: PID3D11UnorderedAccessView): HResult; stdcall;
    function CreateRenderTargetView(Resource: ID3D11Resource; Desc: PD3D11_RENDER_TARGET_VIEW_DESC; 
      RTView: PID3D11RenderTargetView): HResult; stdcall;
    function CreateDepthStencilView(Resource: ID3D11Resource; Desc: PD3D11_DEPTH_STENCIL_VIEW_DESC; 
      DepthStencilView: PID3D11DepthStencilView): HResult; stdcall;
    function CreateInputLayout(InputElementDescs: PD3D11_INPUT_ELEMENT_DESC; NumElements: LongWord; 
      ShaderBytecodeWithInputSignature: Pointer; BytecodeLength: SIZE_T; 
      InputLayout: PID3D11InputLayout): HResult; stdcall;
    function CreateVertexShader(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; ClassLinkage: ID3D11ClassLinkage; 
      VertexShader: PID3D11VertexShader): HResult; stdcall;
    function CreateGeometryShader(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; ClassLinkage: ID3D11ClassLinkage; 
      GeometryShader: PID3D11GeometryShader): HResult; stdcall;
    function CreateGeometryShaderWithStreamOutput(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; 
      SODeclaration: PD3D11_SO_DECLARATION_ENTRY; NumEntries: LongWord; BufferStrides: PLongWord; NumStrides, 
      RasterizedStream: LongWord; ClassLinkage: ID3D11ClassLinkage; 
      GeometryShader: PID3D11GeometryShader): HResult; stdcall;
    function CreatePixelShader(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; ClassLinkage: ID3D11ClassLinkage; 
      PixelShader: PID3D11PixelShader): HResult; stdcall;
    function CreateHullShader(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; ClassLinkage: ID3D11ClassLinkage; 
      HullShader: PID3D11HullShader): HResult; stdcall;
    function CreateDomainShader(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; ClassLinkage: ID3D11ClassLinkage; 
      DomainShader: PID3D11DomainShader): HResult; stdcall;
    function CreateComputeShader(ShaderBytecode: Pointer; BytecodeLength: SIZE_T; ClassLinkage: ID3D11ClassLinkage;
      ComputeShader: PID3D11ComputeShader): HResult; stdcall;
    function CreateClassLinkage(out Linkage: ID3D11ClassLinkage): HResult; stdcall;
    function CreateBlendState(const BlendStateDesc: D3D11_BLEND_DESC; 
      BlendState: PID3D11BlendState): HResult; stdcall;
    function CreateDepthStencilState(const DepthStencilDesc: D3D11_DEPTH_STENCIL_DESC; 
      DepthStencilState: PID3D11DepthStencilState): HResult; stdcall;
    function CreateRasterizerState(const RasterizerDesc: D3D11_RASTERIZER_DESC; 
      RasterizerState: PID3D11RasterizerState): HResult; stdcall;
    function CreateSamplerState(const SamplerDesc: D3D11_SAMPLER_DESC; 
      SamplerState: PID3D11SamplerState): HResult; stdcall;
    function CreateQuery(const QueryDesc: D3D11_QUERY_DESC; Query: PID3D11Query): HResult; stdcall;
    function CreatePredicate(const PredicateDesc: D3D11_QUERY_DESC; Predicate: PID3D11Predicate): HResult; stdcall;
    function CreateCounter(const CounterDesc: D3D11_COUNTER_DESC; Counter: PID3D11Counter): HResult; stdcall;
    function CreateDeferredContext(ContextFlags: LongWord; DeferredContext: PID3D11DeviceContext): HResult; stdcall;
    function OpenSharedResource(ResourceHandle: THandle; const ReturnedInterface: TGuid;
      Resource: Pointer): HResult; stdcall;
    function CheckFormatSupport(Format: DXGI_FORMAT; out FormatSupport: LongWord): HResult; stdcall;
    function CheckMultisampleQualityLevels(Format: DXGI_FORMAT; SampleCount: LongWord; 
      out NumQualityLevels: LongWord): HResult; stdcall;
    procedure CheckCounterInfo(out CounterInfo: D3D11_COUNTER_INFO); stdcall;
    function CheckCounter(const Desc: D3D11_COUNTER_DESC; out &Type: D3D11_COUNTER_TYPE; out ActiveCounters: LongWord;
      Name: PAnsiChar; NameLength: PLongWord; Units: PAnsiChar; UnitsLength: PLongWord; Description: PAnsiChar;
      DescriptionLength: PLongWord): HResult; stdcall;
    function CheckFeatureSupport(Feature: D3D11_FEATURE; FeatureSupportData: Pointer; 
      FeatureSupportDataSize: LongWord): HResult; stdcall;
    function GetPrivateData(const Guid: TGuid; var DataSize: LongWord; Data: Pointer): HResult; stdcall;
    function SetPrivateData(const Guid: TGuid; DataSize: LongWord; Data: Pointer): HResult; stdcall;
    function SetPrivateDataInterface(const Guid: TGuid; Data: IUnknown): HResult; stdcall;
    function GetFeatureLevel: D3D_FEATURE_LEVEL; stdcall;
    function GetCreationFlags: LongWord; stdcall;
    function GetDeviceRemovedReason: HResult; stdcall;
    procedure GetImmediateContext(out ImmediateContext: ID3D11DeviceContext); stdcall;
    function SetExceptionMode(RaiseFlags: LongWord): HResult; stdcall;
    function GetExceptionMode: LongWord; stdcall;
  end;

  PID3D11BlendState1 = ^ID3D11BlendState1;
  ID3D11BlendState1 = interface(ID3D11BlendState)
    [SID_ID3D11BlendState1]
    procedure GetDesc1(out Desc: D3D11_BLEND_DESC1); stdcall;
  end;

  PID3D11RasterizerState1 = ^ID3D11RasterizerState1;
  ID3D11RasterizerState1 = interface(ID3D11RasterizerState)
    [SID_ID3D11RasterizerState1]
    procedure GetDesc1(out Desc: D3D11_RASTERIZER_DESC1); stdcall;
  end;

  PID3DDeviceContextState = ^ID3DDeviceContextState;
  ID3DDeviceContextState = interface(ID3D11DeviceChild)
    [SID_ID3DDeviceContextState]
  end;

  PID3D11DeviceContext1 = ^ID3D11DeviceContext1;
  ID3D11DeviceContext1 = interface(ID3D11DeviceContext)
    [SID_ID3D11DeviceContext1]
    procedure CopySubresourceRegion1(DstResource: ID3D11Resource; DstSubresource, DstX, DstY, DstZ: LongWord; 
      SrcResource: ID3D11Resource; SrcSubresource: LongWord; SrcBox: PD3D11_BOX; CopyFlags: LongWord); stdcall;
    procedure UpdateSubresource1(DstResource: ID3D11Resource; DstSubresource: LongWord; DstBox: PD3D11_BOX; 
      const SrcData: Pointer; SrcRowPitch, SrcDepthPitch, CopyFlags: LongWord); stdcall;
    procedure DiscardResource(Resource: ID3D11Resource); stdcall;
    procedure DiscardView(ResourceView: ID3D11View); stdcall;
    procedure VSSetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure HSSetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure DSSetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure GSSetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure PSSetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure CSSetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure VSGetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure HSGetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure DSGetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure GSGetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure PSGetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure CSGetConstantBuffers1(StartSlot, NumBuffers: LongWord; ConstantBuffers: PID3D11Buffer; FirstConstant, 
      NumConstants: PLongWord); stdcall;
    procedure SwapDeviceContextState(State: ID3DDeviceContextState; PreviousState: PID3DDeviceContextState); stdcall;
    procedure ClearView(View: ID3D11View; const Color: TFourSingleArray; Rect: PD3D11_RECT;
      NumRects: LongWord); stdcall;
    procedure DiscardView1(ResourceView: ID3D11View; Rects: PD3D11_RECT; NumRects: LongWord); stdcall;
  end;

  PID3D11Device1 = ^ID3D11Device1;
  ID3D11Device1 = interface(ID3D11Device)
    [SID_ID3D11Device1]
    procedure GetImmediateContext1(out ImmediateContext: ID3D11DeviceContext1); stdcall;
    function CreateDeferredContext1(ContextFlags: LongWord; DeferredContext: PID3D11DeviceContext1): HResult; stdcall;
    function CreateBlendState1(const BlendStateDesc: D3D11_BLEND_DESC1; 
      BlendState: PID3D11BlendState1): HResult; stdcall;
    function CreateRasterizerState1(const RasterizerDesc: D3D11_RASTERIZER_DESC1; 
      RasterizerState: PID3D11RasterizerState1): HResult; stdcall;
    function CreateDeviceContextState(Flags: LongWord; FeatureLevels: PD3D_FEATURE_LEVEL; _FeatureLevels, 
      SDKVersion: LongWord; var EmulatedInterface: TGuid; ChosenFeatureLevel: PD3D_FEATURE_LEVEL; 
      ContextState: PID3DDeviceContextState): HResult; stdcall;
    function OpenSharedResource1(HResource: THandle; const ReturnedInterface: TGuid; out Resource): HResult; stdcall;
    function OpenSharedResourceByName(LpName: PWideChar; DesiredAccess: LongWord; const ReturnedInterface: TGuid; 
      out Resource): HResult; stdcall;
  end;

  PID3DUserDefinedAnnotation = ^ID3DUserDefinedAnnotation;
  ID3DUserDefinedAnnotation = interface(IUnknown)
    [SID_ID3DUserDefinedAnnotation]
    function BeginEvent(Name: PWideChar): LongInt; stdcall;
    function EndEvent: LongInt; stdcall;
    procedure SetMarker(Name: PWideChar); stdcall;
    function GetStatus: LongBool; stdcall;
  end;

  PID3D11DeviceContext2 = ^ID3D11DeviceContext2;
  ID3D11DeviceContext2 = interface(ID3D11DeviceContext1)
    [SID_ID3D11DeviceContext2]
    function UpdateTileMappings(TiledResource: ID3D11Resource; NumTiledResourceRegions: LongWord; 
      TiledResourceRegionStartCoordinates: PD3D11_TILED_RESOURCE_COORDINATE; 
      TiledResourceRegionSizes: PD3D11_TILE_REGION_SIZE; TilePool: ID3D11Buffer; NumRanges: LongWord; RangeFlags, 
      TilePoolStartOffsets, RangeTileCounts: PLongWord; Flags: LongWord): HResult; stdcall;
    function CopyTileMappings(DestTiledResource: ID3D11Resource; 
      const DestRegionStartCoordinate: D3D11_TILED_RESOURCE_COORDINATE; SourceTiledResource: ID3D11Resource; 
      const SourceRegionStartCoordinate: D3D11_TILED_RESOURCE_COORDINATE; 
      const TileRegionSize: D3D11_TILE_REGION_SIZE; Flags: LongWord): HResult; stdcall;
    procedure CopyTiles(TiledResource: ID3D11Resource; 
      const TileRegionStartCoordinate: D3D11_TILED_RESOURCE_COORDINATE; const TileRegionSize: D3D11_TILE_REGION_SIZE; 
      Buffer: ID3D11Buffer; BufferStartOffsetInBytes: UInt64; Flags: LongWord); stdcall;
    procedure UpdateTiles(DestTiledResource: ID3D11Resource; 
      const DestTileRegionStartCoordinate: D3D11_TILED_RESOURCE_COORDINATE; 
      const DestTileRegionSize: D3D11_TILE_REGION_SIZE; const SourceTileData: Pointer; Flags: LongWord); stdcall;
    function ResizeTilePool(TilePool: ID3D11Buffer; NewSizeInBytes: UInt64): HResult; stdcall;
    procedure TiledResourceBarrier(TiledResourceOrViewAccessBeforeBarrier, 
      TiledResourceOrViewAccessAfterBarrier: ID3D11DeviceChild); stdcall;
    function IsAnnotationEnabled: LongBool; stdcall;
    procedure SetMarkerInt(&Label: PWideChar; Data: LongInt); stdcall;
    procedure BeginEventInt(&Label: PWideChar; Data: LongInt); stdcall;
    procedure EndEvent; stdcall;
  end;

  PID3D11Device2 = ^ID3D11Device2;
  ID3D11Device2 = interface(ID3D11Device1)
    [SID_ID3D11Device2]
    procedure GetImmediateContext2(out ImmediateContext: ID3D11DeviceContext2); stdcall;
    function CreateDeferredContext2(ContextFlags: LongWord; DeferredContext: PID3D11DeviceContext2): HResult; stdcall;
    procedure GetResourceTiling(TiledResource: ID3D11Resource; NumTilesForEntireResource: PLongWord; 
      PackedMipDesc: PD3D11_PACKED_MIP_DESC; StandardTileShapeForNonPackedMips: PD3D11_TILE_SHAPE; 
      NumSubresourceTilings: PLongWord; FirstSubresourceTilingToGet: LongWord; 
      SubresourceTilingsForNonPackedMips: PD3D11_SUBRESOURCE_TILING); stdcall;
    function CheckMultisampleQualityLevels1(Format: DXGI_FORMAT; SampleCount, Flags: LongWord; 
      out NumQualityLevels: LongWord): HResult; stdcall;
  end;

  TD3D11CreateDevice = function(const Adapter: IDXGIAdapter; DriverType: D3D_DRIVER_TYPE; Software: HMODULE;
    Flags: LongWord; FeatureLevels: PD3D_FEATURE_LEVEL; FeatureLevelsCount: LongWord; SDKVersion: LongWord;
    Device: PID3D11Device; FeatureLevel: PD3D_FEATURE_LEVEL; ImmediateContext: PID3D11DeviceContext): HResult; stdcall;

  TD3D11CreateDeviceAndSwapChain = function(const Adapter: IDXGIAdapter; DriverType: D3D_DRIVER_TYPE;
    Software: HMODULE; Flags: LongWord; FeatureLevels: PD3D_FEATURE_LEVEL; FeatureLevelsCount: LongWord;
    SDKVersion: LongWord; SwapChainDesc: PDXGI_SWAP_CHAIN_DESC; SwapChain: PIDXGISwapChain; Device: PID3D11Device;
    FeatureLevel: PD3D_FEATURE_LEVEL; ImmediateContext: PID3D11DeviceContext): HResult; stdcall;

var
  D3D11CreateDevice: TD3D11CreateDevice = nil;
  D3D11CreateDeviceAndSwapChain: TD3D11CreateDeviceAndSwapChain = nil;

function LinkD3D11: Boolean;
procedure UnlinkD3D11;

implementation

const
  LibraryD3D11 = 'd3d11.dll';

var
  LibraryHandle: HModule = 0;

procedure ResetReferences;
begin
  D3D11CreateDevice := nil;
  D3D11CreateDeviceAndSwapChain := nil;
end;

function LinkD3D11: Boolean;
begin
  if LibraryHandle = 0 then
  begin
    LibraryHandle := LoadLibrary(LibraryD3D11);
    if LibraryHandle = 0 then
      Exit(False);

    D3D11CreateDevice := GetProcAddress(LibraryHandle, 'D3D11CreateDevice');
    D3D11CreateDeviceAndSwapChain := GetProcAddress(LibraryHandle, 'D3D11CreateDeviceAndSwapChain');

    Result := Assigned(D3D11CreateDevice) and Assigned(D3D11CreateDeviceAndSwapChain);
    if not Result then
      UnlinkD3D11;
  end
  else
    Result := True;
end;

procedure UnlinkD3D11;
begin
  if LibraryHandle <> 0 then
  begin
    ResetReferences;
    FreeLibrary(LibraryHandle);
    LibraryHandle := 0;
  end;
end;

end.